@empiricalrun/test-gen 0.6.0 → 0.7.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.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bin/scenarios/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAiGpC,iBAAe,iBAAiB,CAC9B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,QAAQ,EAAE,CAAA;CAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bin/scenarios/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAiGpC,iBAAe,iBAAiB,CAC9B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,QAAQ,EAAE,CAAA;CAAE,EAAE,CAAC,CAuBxD;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -88,8 +88,12 @@ async function generateScenarios(scenariosPath) {
|
|
|
88
88
|
if (scenariosPath.startsWith("https://docs.google.com/spreadsheets")) {
|
|
89
89
|
return await generateScenariosUsingGsheet(scenariosPath);
|
|
90
90
|
}
|
|
91
|
-
else if (
|
|
92
|
-
|
|
91
|
+
else if (scenariosPath.endsWith(".yaml")) {
|
|
92
|
+
return await generateScenariosUsingYAML(scenariosPath);
|
|
93
|
+
}
|
|
94
|
+
else if (isValidJSON(atob(scenariosPath))) {
|
|
95
|
+
const str = atob(scenariosPath);
|
|
96
|
+
const config = JSON.parse(str);
|
|
93
97
|
const specPath = `./tests/${config.group || "index"}.spec.ts`;
|
|
94
98
|
return [
|
|
95
99
|
{
|
|
@@ -104,8 +108,6 @@ async function generateScenarios(scenariosPath) {
|
|
|
104
108
|
},
|
|
105
109
|
];
|
|
106
110
|
}
|
|
107
|
-
|
|
108
|
-
return await generateScenariosUsingYAML(scenariosPath);
|
|
109
|
-
}
|
|
111
|
+
throw Error("Invalid path for test scenarios");
|
|
110
112
|
}
|
|
111
113
|
exports.generateScenarios = generateScenarios;
|