Skip to content

Commit

Permalink
Check the number of tests passed
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte committed Mar 7, 2019
1 parent 5e21039 commit df62dd6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions e2e/__tests__/fatalWorkerError.test.ts
Expand Up @@ -38,7 +38,11 @@ test('fails a test that terminates the worker with a fatal error', () => {
});

const {status, stderr} = runJest(DIR);

const numberOfTestsPassed = stderr.match(/\bPASS\b/g).length;

expect(status).not.toBe(0);
expect(numberOfTestsPassed).toBe(Object.keys(testFiles).length - 1);
expect(stderr).toContain('FAIL __tests__/fatalWorkerError.test.js');
expect(stderr).toContain('Call retries were exceeded');
});

0 comments on commit df62dd6

Please sign in to comment.