diff options
Diffstat (limited to 'scripts/cmd/test.js')
-rw-r--r-- | scripts/cmd/test.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/cmd/test.js b/scripts/cmd/test.js index 4e3b6c6ca..396e4b721 100644 --- a/scripts/cmd/test.js +++ b/scripts/cmd/test.js @@ -63,6 +63,11 @@ export default async function test() { watch: args['--watch'], timeout: args['--timeout'] ?? defaultTimeout, // Node.js defaults to Infinity, so set better fallback }) + .on('test:fail', () => { + // For some reason, a test fail using the JS API does not set an exit code of 1, + // so we set it here manually + process.exitCode = 1; + }) .pipe(new spec()) .pipe(process.stdout); } |