mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Handle test-cli failure case for CI (#19265)
This commit is contained in:
1 parent
0f84b0f02b
commit
0c0aaeb6bc
1 file changed
+11
-1
@@ -317,7 +317,17 @@ function main() {
|
||||
}
|
||||
|
||||
// Run Jest.
|
||||
spawn('node', args, {stdio: 'inherit', env: {...envars, ...process.env}});
|
||||
const jest = spawn('node', args, {
|
||||
stdio: 'inherit',
|
||||
env: {...envars, ...process.env},
|
||||
});
|
||||
// Ensure we close our process when we get a failure case.
|
||||
jest.on('close', code => {
|
||||
// Forward the exit code from the Jest process.
|
||||
if (code === 1) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in new issue
Block a user