Skip to content

Commit

Permalink
fix concurrent test failure (jestjs#4159)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronabramov authored and cpojer committed Jul 30, 2017
1 parent 7747cc5 commit 8884f9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration_tests/__tests__/find_related_files.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import os from 'os';
import path from 'path';

const skipOnWindows = require('../../scripts/skip_on_windows');
const DIR = path.resolve(os.tmpdir(), 'force_exit_test');
const DIR = path.resolve(os.tmpdir(), 'find_related_tests_test');

skipOnWindows.suite();

Expand Down
7 changes: 5 additions & 2 deletions integration_tests/__tests__/force_exit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ test('exits the process after test are done but before timers complete', () => {
});

let stdout;
({stdout} = runJest(DIR));
let stderr;
({stdout, stderr} = runJest(DIR));
expect(stderr).toMatch(/PASS.*test\.test\.js/);
expect(stdout).toMatch(/TIMER_DONE/);
writeFiles(DIR, {
'package.json': JSON.stringify({
jest: {forceExit: true, testEnvironment: 'node'},
}),
});

({stdout} = runJest(DIR));
({stdout, stderr} = runJest(DIR));
expect(stderr).toMatch(/PASS.*test\.test\.js/);
expect(stdout).not.toMatch(/TIMER_DONE/);
});

0 comments on commit 8884f9c

Please sign in to comment.