Skip to content

Commit

Permalink
fix(Jest): Fix Jest middleware always exit with zero code (neutrinojs…
Browse files Browse the repository at this point in the history
  • Loading branch information
okonet authored and Tim Kelty committed Jan 17, 2018
1 parent 300676e commit 9952572
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/jest/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ module.exports = (neutrino, opts = {}) => {

writeFileSync(configFile, `${JSON.stringify(options, null, 2)}\n`);

jest.runCLI(cliOptions, options.roots || [options.rootDir], result =>
(result.numFailedTests || result.numFailedTestSuites ?
reject() :
resolve()));
jest.runCLI(cliOptions, options.roots || [options.rootDir])
.then(results => results.success ? resolve() : reject())
.catch(error => reject(error));
});
});
};

0 comments on commit 9952572

Please sign in to comment.