@brillout/test-e2e 0.6.12 → 0.6.14
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/Logs.js +5 -4
- package/dist/run.js +2 -4
- package/package.json +1 -1
package/dist/Logs.js
CHANGED
|
@@ -7,7 +7,7 @@ export const Logs = {
|
|
|
7
7
|
hasFailureLog,
|
|
8
8
|
logEagerly: false,
|
|
9
9
|
};
|
|
10
|
-
import { assert, cliOptions, ensureNewTerminalLine,
|
|
10
|
+
import { assert, cliOptions, ensureNewTerminalLine, isWindows } from './utils.js';
|
|
11
11
|
import pc from '@brillout/picocolors';
|
|
12
12
|
import { getCurrentTest, getCurrentTestOptional } from './getCurrentTest.js';
|
|
13
13
|
import { logSection } from './logSection.js';
|
|
@@ -62,12 +62,13 @@ function flushLogs() {
|
|
|
62
62
|
}
|
|
63
63
|
function add({ logSource, logText, logInfo = '', loggedAfterExit = false, }) {
|
|
64
64
|
const logTimestamp = getTimestamp();
|
|
65
|
+
const isNotFailure = isTolerateError({ logSource, logText });
|
|
65
66
|
const logEntry = {
|
|
66
67
|
logSource,
|
|
67
68
|
logText,
|
|
68
69
|
logInfo,
|
|
69
70
|
logTimestamp,
|
|
70
|
-
isNotFailure
|
|
71
|
+
isNotFailure,
|
|
71
72
|
loggedAfterExit,
|
|
72
73
|
};
|
|
73
74
|
logEntries.push(logEntry);
|
|
@@ -81,12 +82,12 @@ function add({ logSource, logText, logInfo = '', loggedAfterExit = false, }) {
|
|
|
81
82
|
if (shouldLog)
|
|
82
83
|
printLog(logEntry);
|
|
83
84
|
}
|
|
84
|
-
if (logSource === 'Browser Error' || logSource === 'stderr') {
|
|
85
|
+
if ((logSource === 'Browser Error' || logSource === 'stderr') && !isNotFailure) {
|
|
85
86
|
terminateUponErrorLog(logSource);
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
async function terminateUponErrorLog(logSource) {
|
|
89
|
-
const shouldBail = cliOptions.bail
|
|
90
|
+
const shouldBail = cliOptions.bail;
|
|
90
91
|
if (!shouldBail)
|
|
91
92
|
return;
|
|
92
93
|
const testInfo = getCurrentTest();
|
package/dist/run.js
CHANGED
|
@@ -93,10 +93,8 @@ additionalTimeout = 0, serverIsReadyMessage, serverIsReadyDelay = 1000, inspect
|
|
|
93
93
|
function onPageError(err) {
|
|
94
94
|
Logs.add({
|
|
95
95
|
logSource: 'Browser Error',
|
|
96
|
-
logText:
|
|
97
|
-
|
|
98
|
-
location: err.stack,
|
|
99
|
-
}, null, 2),
|
|
96
|
+
logText: err.stack || err.message,
|
|
97
|
+
logInfo: JSON.stringify({ errorMessage: err.message }, null, 2),
|
|
100
98
|
});
|
|
101
99
|
}
|
|
102
100
|
}
|