artes 1.1.18 → 1.1.19

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/executer.js CHANGED
@@ -7,6 +7,7 @@ const {
7
7
  generateReport,
8
8
  cleanUp,
9
9
  } = require("./src/helper/executers/exporter");
10
+ const fs = require("fs");
10
11
 
11
12
  const args = process.argv.slice(2);
12
13
 
@@ -111,6 +112,15 @@ function main() {
111
112
 
112
113
  runTests();
113
114
  if (flags.report) generateReport();
115
+
116
+ if (fs.existsSync("./node_modules/artes/testsStatus/EXIT_CODE.txt")) {
117
+ const data = fs.readFileSync(
118
+ "./node_modules/artes/testsStatus/EXIT_CODE.txt",
119
+ "utf8",
120
+ );
121
+ process.env.EXIT_CODE = parseInt(data, 10);
122
+ }
123
+
114
124
  cleanUp();
115
125
  process.exit(process.env.EXIT_CODE);
116
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.1.18",
3
+ "version": "1.1.19",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -155,12 +155,12 @@ AfterAll(async function () {
155
155
  console.log(
156
156
  `Tests passed required ${cucumberConfig.default.testPercentage}% success rate with ${successPercentage.toFixed(2)}% !`,
157
157
  );
158
- process.env.EXIT_CODE = 0;
158
+ fs.writeFileSync(path.join(statusDir, `EXIT_CODE.txt`), "0");
159
159
  } else {
160
160
  console.log(
161
161
  `Tests failed at required ${cucumberConfig.default.testPercentage}% success rate with ${successPercentage.toFixed(2)}%!`,
162
162
  );
163
- process.env.EXIT_CODE = 1;
163
+ fs.writeFileSync(path.join(statusDir, `EXIT_CODE.txt`), "1");
164
164
  }
165
165
  }
166
166
  }