Skip to content

Commit

Permalink
Improve e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte committed Mar 7, 2019
1 parent f7eecec commit 6cee8b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions e2e/__tests__/fatalWorkerError.test.ts
Expand Up @@ -37,8 +37,12 @@ test('fails a test that terminates the worker with a fatal error', () => {
'package.json': '{}',
});

const {status, stderr} = runJest(DIR);
expect(status).toBe(1);
const {status, stderr} = runJest(DIR, ['--maxWorkers=2']);

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 6cee8b2

Please sign in to comment.