mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -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
|
@ -63,6 +63,11 @@ export default async function test() {
|
||||||
watch: args['--watch'],
|
watch: args['--watch'],
|
||||||
timeout: args['--timeout'] ?? defaultTimeout, // Node.js defaults to Infinity, so set better fallback
|
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(new spec())
|
||||||
.pipe(process.stdout);
|
.pipe(process.stdout);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue