@brillout/test-e2e 0.5.14 → 0.5.16
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/logTestStatus.js +1 -1
- package/dist/runAll.js +4 -1
- package/dist/utils/cliConfig.d.ts +1 -0
- package/dist/utils/cliConfig.js +2 -0
- package/package.json +1 -1
package/dist/logTestStatus.js
CHANGED
|
@@ -24,7 +24,7 @@ function logFail(reason, isFinalAttempt) {
|
|
|
24
24
|
}
|
|
25
25
|
const { FAIL } = getStatusTags();
|
|
26
26
|
const color = (s) => picocolors_1.default.red(picocolors_1.default.bold(s));
|
|
27
|
-
const msg = `Test ${isFinalAttempt ? FAIL : 'failed'} because ${reason}, see below
|
|
27
|
+
const msg = `Test ${isFinalAttempt ? FAIL : 'failed'} because ${reason}, see below. [TEST_FAILURE]`;
|
|
28
28
|
console.log(color(msg));
|
|
29
29
|
}
|
|
30
30
|
exports.logFail = logFail;
|
package/dist/runAll.js
CHANGED
|
@@ -27,7 +27,7 @@ async function runAll(filter) {
|
|
|
27
27
|
(0, utils_1.assert)(hasFailedTestFile && hasFailLog);
|
|
28
28
|
(0, utils_1.assert)(failedTestFiles.length > 0);
|
|
29
29
|
throw new Error([
|
|
30
|
-
'Following test files failed, see logs above for more information.',
|
|
30
|
+
'Following test files failed, see logs above for more information (search for [TEST_FAILURE]).',
|
|
31
31
|
...failedTestFiles.map((testFile) => ` ${testFile}`),
|
|
32
32
|
].join('\n'));
|
|
33
33
|
}
|
|
@@ -39,6 +39,9 @@ async function runTestFiles(testFiles, browser) {
|
|
|
39
39
|
const success = await buildAndTest(testFile, browser, false);
|
|
40
40
|
if (!success) {
|
|
41
41
|
failedFirstAttempt.push(testFile);
|
|
42
|
+
if (utils_1.cliConfig.bail) {
|
|
43
|
+
return failedFirstAttempt;
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
if (!(0, utils_1.isCI)()) {
|
package/dist/utils/cliConfig.js
CHANGED
|
@@ -6,6 +6,7 @@ const parseCli_1 = require("./parseCli");
|
|
|
6
6
|
const verbose = (0, parseCli_1.check)('--verbose');
|
|
7
7
|
const inspect = (0, parseCli_1.check)('--inspect');
|
|
8
8
|
const debugEsbuild = (0, parseCli_1.check)('--debug-esbuild');
|
|
9
|
+
const bail = (0, parseCli_1.check)('--bail');
|
|
9
10
|
/* Defined in ./findFiles.ts
|
|
10
11
|
* I don't think we use the --exclude option anymore? Can we remove it?
|
|
11
12
|
const exclude = check('--exclude')
|
|
@@ -16,5 +17,6 @@ const cliConfig = {
|
|
|
16
17
|
// To inspect a specific test: `$ touch examples/some-example/INSPECT`
|
|
17
18
|
inspect: inspect || !!process.env.TEST_INSPECT,
|
|
18
19
|
debugEsbuild,
|
|
20
|
+
bail
|
|
19
21
|
};
|
|
20
22
|
exports.cliConfig = cliConfig;
|