mirror of
https://github.com/withastro/astro.git
synced 2025-01-06 22:10:10 -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'],
|
setup: args['--setup'],
|
||||||
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