@brillout/test-e2e 0.5.3 → 0.5.4
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/isTolerateError.js +4 -4
- package/dist/Logs.js +5 -5
- package/package.json +1 -1
|
@@ -7,14 +7,14 @@ function isTolerateError({ logSource, logText }) {
|
|
|
7
7
|
return true;
|
|
8
8
|
}
|
|
9
9
|
const config = (0, getConfig_1.getConfig)();
|
|
10
|
-
if (
|
|
11
|
-
return
|
|
10
|
+
if (config.tolerateError?.({ logSource, logText })) {
|
|
11
|
+
return true;
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return false;
|
|
14
14
|
}
|
|
15
15
|
exports.isTolerateError = isTolerateError;
|
|
16
16
|
function tolerateError({ logSource, logText }) {
|
|
17
|
-
return isFetchExperimentalWarning()
|
|
17
|
+
return isFetchExperimentalWarning() || isTerminationEPIPE();
|
|
18
18
|
function isFetchExperimentalWarning() {
|
|
19
19
|
return (logSource === 'stderr' &&
|
|
20
20
|
logText.includes('ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time'));
|
package/dist/Logs.js
CHANGED
|
@@ -23,12 +23,13 @@ function hasFailLogs(failOnWarning) {
|
|
|
23
23
|
return failLogs.length > 0;
|
|
24
24
|
}
|
|
25
25
|
function getErrorLogs(includeWarnings) {
|
|
26
|
-
const errorLogs = logEntries.filter((
|
|
27
|
-
if (isNotFailure) {
|
|
26
|
+
const errorLogs = logEntries.filter((logEntry) => {
|
|
27
|
+
if (logEntry.isNotFailure) {
|
|
28
28
|
return false;
|
|
29
29
|
}
|
|
30
|
+
const { logSource } = logEntry;
|
|
30
31
|
// taskkill makes process exit with exit code `1` which makes npm emit logs on stderr
|
|
31
|
-
if (loggedAfterExit && (0, utils_1.isWindows)() && logSource === 'stderr') {
|
|
32
|
+
if (logEntry.loggedAfterExit && (0, utils_1.isWindows)() && logSource === 'stderr') {
|
|
32
33
|
return false;
|
|
33
34
|
}
|
|
34
35
|
if (logSource === 'run() failure') {
|
|
@@ -61,12 +62,11 @@ function flushLogs() {
|
|
|
61
62
|
}
|
|
62
63
|
function add({ logSource, logText, loggedAfterExit = false, }) {
|
|
63
64
|
const logTimestamp = getTimestamp();
|
|
64
|
-
const isNotFailure = (0, isTolerateError_1.isTolerateError)({ logSource, logText });
|
|
65
65
|
const logEntry = {
|
|
66
66
|
logSource,
|
|
67
67
|
logText,
|
|
68
68
|
logTimestamp,
|
|
69
|
-
isNotFailure,
|
|
69
|
+
isNotFailure: (0, isTolerateError_1.isTolerateError)({ logSource, logText }),
|
|
70
70
|
loggedAfterExit,
|
|
71
71
|
};
|
|
72
72
|
logEntries.push(logEntry);
|