allure 3.0.0-beta.7 → 3.0.0-beta.8

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.
@@ -54,6 +54,7 @@ const runTests = async (allureReport, cwd, command, commandArgs, environment, si
54
54
  allureResultsWatchers.delete(ar);
55
55
  }
56
56
  await processWatcher.abort();
57
+ return code;
57
58
  };
58
59
  export const RunCommandAction = async (options) => {
59
60
  const args = options["--"];
@@ -61,9 +62,9 @@ export const RunCommandAction = async (options) => {
61
62
  throw new Error("expecting command to be specified after --, e.g. allure run -- npm run test");
62
63
  }
63
64
  const before = new Date().getTime();
64
- process.on("exit", (code) => {
65
+ process.on("exit", (exitCode) => {
65
66
  const after = new Date().getTime();
66
- console.log(`exit code ${code} (${after - before}ms)`);
67
+ console.log(`exit code ${exitCode} (${after - before}ms)`);
67
68
  });
68
69
  const command = args[0];
69
70
  const commandArgs = args.slice(1);
@@ -98,7 +99,7 @@ export const RunCommandAction = async (options) => {
98
99
  ],
99
100
  });
100
101
  await allureReport.start();
101
- await runTests(allureReport, cwd, command, commandArgs, {}, silent);
102
+ let code = await runTests(allureReport, cwd, command, commandArgs, {}, silent);
102
103
  for (let rerun = 0; rerun < maxRerun; rerun++) {
103
104
  const failed = await allureReport.store.failedTestResults();
104
105
  if (failed.length === 0) {
@@ -111,7 +112,7 @@ export const RunCommandAction = async (options) => {
111
112
  const tmpDir = await mkdtemp(join(tmpdir(), "allure-run-"));
112
113
  const testPlanPath = resolve(tmpDir, `${rerun}-testplan.json`);
113
114
  await writeFile(testPlanPath, JSON.stringify(testPlan));
114
- await runTests(allureReport, cwd, command, commandArgs, {
115
+ code = await runTests(allureReport, cwd, command, commandArgs, {
115
116
  ALLURE_TESTPLAN_PATH: testPlanPath,
116
117
  ALLURE_RERUN: `${rerun}`,
117
118
  }, silent);
@@ -120,7 +121,7 @@ export const RunCommandAction = async (options) => {
120
121
  }
121
122
  await allureReport.done();
122
123
  await allureReport.validate();
123
- process.exit(allureReport.exitCode);
124
+ process.exit(code ?? allureReport.exitCode);
124
125
  };
125
126
  export const RunCommand = createCommand({
126
127
  name: "run",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allure",
3
- "version": "3.0.0-beta.7",
3
+ "version": "3.0.0-beta.8",
4
4
  "description": "Allure Commandline Tool",
5
5
  "keywords": [
6
6
  "allure",
@@ -30,16 +30,16 @@
30
30
  "test": "vitest run"
31
31
  },
32
32
  "dependencies": {
33
- "@allurereport/core": "3.0.0-beta.7",
34
- "@allurereport/core-api": "3.0.0-beta.7",
35
- "@allurereport/directory-watcher": "3.0.0-beta.7",
36
- "@allurereport/plugin-api": "3.0.0-beta.7",
37
- "@allurereport/plugin-awesome": "3.0.0-beta.7",
38
- "@allurereport/plugin-progress": "3.0.0-beta.7",
39
- "@allurereport/plugin-server-reload": "3.0.0-beta.7",
40
- "@allurereport/plugin-slack": "3.0.0-beta.7",
41
- "@allurereport/reader-api": "3.0.0-beta.7",
42
- "@allurereport/static-server": "3.0.0-beta.7",
33
+ "@allurereport/core": "3.0.0-beta.8",
34
+ "@allurereport/core-api": "3.0.0-beta.8",
35
+ "@allurereport/directory-watcher": "3.0.0-beta.8",
36
+ "@allurereport/plugin-api": "3.0.0-beta.8",
37
+ "@allurereport/plugin-awesome": "3.0.0-beta.8",
38
+ "@allurereport/plugin-progress": "3.0.0-beta.8",
39
+ "@allurereport/plugin-server-reload": "3.0.0-beta.8",
40
+ "@allurereport/plugin-slack": "3.0.0-beta.8",
41
+ "@allurereport/reader-api": "3.0.0-beta.8",
42
+ "@allurereport/static-server": "3.0.0-beta.8",
43
43
  "cac": "^6.7.14",
44
44
  "lodash.omit": "^4.5.0",
45
45
  "yoctocolors": "^2.1.1"
@@ -52,7 +52,8 @@
52
52
  "@typescript-eslint/eslint-plugin": "^8.0.0",
53
53
  "@typescript-eslint/parser": "^8.0.0",
54
54
  "@vitest/runner": "^2.1.8",
55
- "allure-vitest": "^3.0.7",
55
+ "@vitest/snapshot": "^2.1.8",
56
+ "allure-vitest": "^3.0.9",
56
57
  "eslint": "^8.57.0",
57
58
  "eslint-config-prettier": "^9.1.0",
58
59
  "eslint-plugin-import": "^2.29.1",