redput 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog
CHANGED
package/lib/write/index.js
CHANGED
|
@@ -17,13 +17,12 @@ import tryToCatch from 'try-to-catch';
|
|
|
17
17
|
export const writePlugin = async (name, {rule, fixture, report}) => {
|
|
18
18
|
const [isNested] = await tryToCatch(access, './package.json');
|
|
19
19
|
|
|
20
|
-
if (isNested)
|
|
20
|
+
if (isNested)
|
|
21
21
|
return await writeNested(name, {
|
|
22
22
|
rule,
|
|
23
23
|
fixture,
|
|
24
24
|
report,
|
|
25
25
|
});
|
|
26
|
-
}
|
|
27
26
|
|
|
28
27
|
await writeSimple(name, {
|
|
29
28
|
rule,
|
|
@@ -36,6 +35,13 @@ export const writeNested = async (name, {rule, fixture, report}) => {
|
|
|
36
35
|
await writeNestedRule(name, rule);
|
|
37
36
|
await writeNestedFixtures(name, fixture);
|
|
38
37
|
await writeNestedTests(name, report);
|
|
38
|
+
|
|
39
|
+
await tryToCatch(writeNestedOptional, name, {
|
|
40
|
+
fixture,
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const writeNestedOptional = async (name, {fixture}) => {
|
|
39
45
|
await updateNestedIndex(name);
|
|
40
46
|
await updateOverallNestedFixtures(name, fixture);
|
|
41
47
|
await updateOverallNestedTest(name);
|