@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.
- package/dist/runAll.js +16 -10
- 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
|
-
|
|
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
|
-
|
|
42
|
+
failedTestFiles.push(testFile);
|
|
42
43
|
if (utils_1.cliConfig.bail) {
|
|
43
|
-
return
|
|
44
|
+
return failedTestFiles;
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
if (!(0, utils_1.isCI)()) {
|
|
48
|
-
return
|
|
49
|
+
return failedTestFiles;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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'));
|