@brillout/test-e2e 0.5.16 → 0.5.17

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.
Files changed (2) hide show
  1. package/dist/runAll.js +14 -11
  2. package/package.json +1 -1
package/dist/runAll.js CHANGED
@@ -34,27 +34,30 @@ async function runAll(filter) {
34
34
  }
35
35
  exports.runAll = runAll;
36
36
  async function runTestFiles(testFiles, browser) {
37
- const failedFirstAttempt = [];
37
+ // First attempt
38
+ let failedTestFiles = [];
38
39
  for (const testFile of testFiles) {
39
40
  const success = await buildAndTest(testFile, browser, false);
40
41
  if (!success) {
41
- failedFirstAttempt.push(testFile);
42
+ failedTestFiles.push(testFile);
42
43
  if (utils_1.cliConfig.bail) {
43
- return failedFirstAttempt;
44
+ return failedTestFiles;
44
45
  }
45
46
  }
46
47
  }
47
48
  if (!(0, utils_1.isCI)()) {
48
- return failedFirstAttempt;
49
- }
50
- const failedSecondAttempt = [];
51
- for (const testFile of failedFirstAttempt) {
52
- const success = await buildAndTest(testFile, browser, true);
53
- if (!success) {
54
- failedSecondAttempt.push(testFile);
49
+ return failedTestFiles;
50
+ }
51
+ // Second & third attempt
52
+ for (let n = 1; n <= 2; n++) {
53
+ for (const testFile of failedTestFiles) {
54
+ const success = await buildAndTest(testFile, browser, true);
55
+ if (success) {
56
+ failedTestFiles = failedTestFiles.filter((t) => t !== testFile);
57
+ }
55
58
  }
56
59
  }
57
- return failedSecondAttempt;
60
+ return failedTestFiles;
58
61
  }
59
62
  async function buildAndTest(testFile, browser, isSecondAttempt) {
60
63
  (0, utils_1.assert)(testFile.endsWith('.ts'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/test-e2e",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {