@brillout/test-e2e 0.5.16 → 0.5.18

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 +16 -10
  2. package/package.json +1 -1
package/dist/runAll.js CHANGED
@@ -34,27 +34,33 @@ 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
+ return failedTestFiles;
49
50
  }
50
- const failedSecondAttempt = [];
51
- for (const testFile of failedFirstAttempt) {
52
- const success = await buildAndTest(testFile, browser, true);
53
- if (!success) {
54
- failedSecondAttempt.push(testFile);
51
+ else {
52
+ // Second & third attempt
53
+ for (let i = 0; i <= 1; i++) {
54
+ console.log((i === 0 ? 'SECOND' : 'THIRD') + '_ATTEMPT');
55
+ for (const testFile of failedTestFiles) {
56
+ const success = await buildAndTest(testFile, browser, true);
57
+ if (success) {
58
+ failedTestFiles = failedTestFiles.filter((t) => t !== testFile);
59
+ }
60
+ }
55
61
  }
62
+ return failedTestFiles;
56
63
  }
57
- return failedSecondAttempt;
58
64
  }
59
65
  async function buildAndTest(testFile, browser, isSecondAttempt) {
60
66
  (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.18",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {