mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Exit code 1 if node:test fail (#9928)
This commit is contained in:
parent
27ea080e24
commit
432c170554
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,11 @@ export default async function test() {
|
|||
setup: args['--setup'],
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue