@empiricalrun/test-gen 0.10.2 → 0.10.3

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,5 +1,11 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 08f12e9: fix: browsing agent output works with ci reporter
8
+
3
9
  ## 0.10.2
4
10
 
5
11
  ### Patch Changes
package/dist/bin/index.js CHANGED
@@ -17,6 +17,7 @@ dotenv_1.default.config({
17
17
  });
18
18
  const logger = new logger_1.CustomLogger();
19
19
  async function runAgent(sourceFile, isUpdate, testGenConfigs) {
20
+ const generatedTestScenarios = [];
20
21
  const compatibleWithBrowsing = !sourceFile.endsWith(".yaml") &&
21
22
  !sourceFile.startsWith("https://docs.google.com/spreadsheets") &&
22
23
  !isUpdate;
@@ -29,14 +30,14 @@ async function runAgent(sourceFile, isUpdate, testGenConfigs) {
29
30
  else {
30
31
  fileForBrowsingAgent = testGenConfig.specPath;
31
32
  await (0, utils_1.prepareFileForBrowsingAgent)(testGenConfig);
33
+ generatedTestScenarios.push(...testGenConfig.scenarios);
32
34
  }
33
35
  if (fileForBrowsingAgent) {
34
36
  logger.success("Generating tests using browsing agent");
35
37
  await (0, run_1.generateTestsUsingBrowsingAgent)(fileForBrowsingAgent);
36
- process.exit(0);
38
+ return generatedTestScenarios;
37
39
  }
38
40
  }
39
- const generatedTestScenarios = [];
40
41
  for (const testGenConfig of testGenConfigs) {
41
42
  const { specPath, scenarios } = testGenConfig;
42
43
  if (!fs_extra_1.default.existsSync(specPath)) {
@@ -82,6 +83,6 @@ async function parseArgs() {
82
83
  }
83
84
  const { sourceFile, testGenConfigs, isUpdate } = await parseArgs();
84
85
  const generated = await runAgent(sourceFile, isUpdate, testGenConfigs);
85
- // TODO: make this work with browsing agent
86
86
  await (0, ci_1.reportOnCI)(generated);
87
+ process.exit(0);
87
88
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"