Skip to content

Commit 6cee8b2

Browse files
committed
Improve e2e test
1 parent f7eecec commit 6cee8b2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

e2e/__tests__/fatalWorkerError.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ test('fails a test that terminates the worker with a fatal error', () => {
3737
'package.json': '{}',
3838
});
3939

40-
const {status, stderr} = runJest(DIR);
41-
expect(status).toBe(1);
40+
const {status, stderr} = runJest(DIR, ['--maxWorkers=2']);
41+
42+
const numberOfTestsPassed = (stderr.match(/\bPASS\b/g) || []).length;
43+
44+
expect(status).not.toBe(0);
45+
expect(numberOfTestsPassed).toBe(Object.keys(testFiles).length - 1);
4246
expect(stderr).toContain('FAIL __tests__/fatalWorkerError.test.js');
4347
expect(stderr).toContain('Call retries were exceeded');
4448
});

0 commit comments

Comments
 (0)