Skip to content

Commit

Permalink
feat(jest-environment): reject hasFinished when build has failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZauberNerd committed Feb 16, 2022
1 parent 618fc87 commit bbe6ddc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/jest-environment/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ const startServer = ({ cwd, command, env = {}, argv = [] }) => {
) {
hasFinishedPromise.resolve();
}

if (line.match(/bundling [^ ]+ failed/)) {
setTimeout(() => {
hasFinishedPromise.reject({ stdout, stderr });
}, 5000);
}
});

started.stderr.on('data', (data) => {
Expand Down

0 comments on commit bbe6ddc

Please sign in to comment.