Skip to content

Commit 7d54011

Browse files
committed
refactor: update test runner to use proxess.exit instead of treekill
This fixes an issue on Linux CI that `ng serve` sub-process is not terminated properly when using tree-kill which causes the tests test process not to exit.
1 parent a5d4735 commit 7d54011

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
import { killAllProcesses } from './process';
2-
31
const testScript: string = process.argv[2];
42
const testModule = require(testScript);
53
const testFunction: () => Promise<void> | void =
64
typeof testModule == 'function'
75
? testModule
86
: typeof testModule.default == 'function'
9-
? testModule.default
10-
: () => {
11-
throw new Error('Invalid test module.');
12-
};
7+
? testModule.default
8+
: () => {
9+
throw new Error('Invalid test module.');
10+
};
1311

1412
(async () => {
1513
try {
@@ -18,6 +16,6 @@ const testFunction: () => Promise<void> | void =
1816
console.error('Test Process error', e);
1917
process.exitCode = -1;
2018
} finally {
21-
await killAllProcesses();
19+
process.exit();
2220
}
2321
})();

0 commit comments

Comments
 (0)