@brillout/test-e2e 0.4.3 → 0.4.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/setup.js +13 -2
- package/package.json +1 -1
package/dist/setup.js
CHANGED
|
@@ -312,7 +312,7 @@ function execRunScript({ onStdout, onFailure, onExit, }) {
|
|
|
312
312
|
await exitAndFail(new Error(`Command is \`${cmd}\` (${cwd}) is invoking \`stdin\`: ${data}.`));
|
|
313
313
|
});
|
|
314
314
|
proc.stdout.on('data', (data) => {
|
|
315
|
-
(
|
|
315
|
+
assertNotExited(data);
|
|
316
316
|
(0, utils_2.assert)(getRunInfo().cmd === cmd);
|
|
317
317
|
data = data.toString();
|
|
318
318
|
Logs_1.Logs.add({
|
|
@@ -322,7 +322,7 @@ function execRunScript({ onStdout, onFailure, onExit, }) {
|
|
|
322
322
|
onStdout?.(data);
|
|
323
323
|
});
|
|
324
324
|
proc.stderr.on('data', async (data) => {
|
|
325
|
-
(
|
|
325
|
+
assertNotExited(data);
|
|
326
326
|
(0, utils_2.assert)(getRunInfo().cmd === cmd);
|
|
327
327
|
data = data.toString();
|
|
328
328
|
Logs_1.Logs.add({
|
|
@@ -358,6 +358,17 @@ function execRunScript({ onStdout, onFailure, onExit, }) {
|
|
|
358
358
|
exitPromiseResolve();
|
|
359
359
|
});
|
|
360
360
|
return { terminate, processHasExited };
|
|
361
|
+
function assertNotExited(data) {
|
|
362
|
+
if (!procExited)
|
|
363
|
+
return;
|
|
364
|
+
Logs_1.Logs.logErrors(true);
|
|
365
|
+
Logs_1.Logs.flushLogs();
|
|
366
|
+
console.log('getCurrentTest()', (0, getCurrentTest_1.getCurrentTest)());
|
|
367
|
+
console.log('data', data);
|
|
368
|
+
console.log('cmd', cmd);
|
|
369
|
+
console.log('process.platform', process.platform);
|
|
370
|
+
(0, utils_2.assert)(false);
|
|
371
|
+
}
|
|
361
372
|
function processHasExited() {
|
|
362
373
|
return procExited;
|
|
363
374
|
}
|