diff --git a/CHANGELOG.md b/CHANGELOG.md index 39021d60caf7..d5441ff255f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Chore & Maintenance - `[website]` Switch domain to https://jestjs.io ([#6549](https://github.com/facebook/jest/pull/6549)) +- `[tests]` Improve stability of `yarn test` on Windows ([#6534](https://github.com/facebook/jest/pull/6534)) ## 23.2.0 diff --git a/e2e/__tests__/test_environment_async.test.js b/e2e/__tests__/test_environment_async.test.js index b10181689af4..8decfc1121bc 100644 --- a/e2e/__tests__/test_environment_async.test.js +++ b/e2e/__tests__/test_environment_async.test.js @@ -13,7 +13,7 @@ const os = require('os'); const runJest = require('../runJest'); const {cleanup} = require('../Utils'); -const DIR = os.tmpdir() + '/jest'; +const DIR = os.tmpdir() + '/jest-test-environment'; beforeEach(() => cleanup(DIR)); afterAll(() => cleanup(DIR)); diff --git a/e2e/test-environment-async/TestEnvironment.js b/e2e/test-environment-async/TestEnvironment.js index a650d8436da7..a5b5b8648b22 100644 --- a/e2e/test-environment-async/TestEnvironment.js +++ b/e2e/test-environment-async/TestEnvironment.js @@ -5,7 +5,7 @@ const os = require('os'); const mkdirp = require('mkdirp'); const JSDOMEnvironment = require('jest-environment-jsdom'); -const DIR = os.tmpdir() + '/jest'; +const DIR = os.tmpdir() + '/jest-test-environment'; class TestEnvironment extends JSDOMEnvironment { constructor(config) { diff --git a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap index b3c6e240ddd7..4acf2575baa6 100644 --- a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap +++ b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap @@ -17,17 +17,6 @@ exports[`Upgrade help logs a warning when \`scriptPreprocessor\` and/or \`prepro " `; -exports[`preset throws when preset is invalid 1`] = ` -"Validation Error: - - Preset react-native is invalid: - Unexpected token } in JSON at position 104 - - Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html -" -`; - exports[`preset throws when preset not found 1`] = ` "Validation Error: diff --git a/packages/jest-config/src/__tests__/normalize.test.js b/packages/jest-config/src/__tests__/normalize.test.js index bc2b5a759231..b7d3d99cfeb0 100644 --- a/packages/jest-config/src/__tests__/normalize.test.js +++ b/packages/jest-config/src/__tests__/normalize.test.js @@ -946,7 +946,7 @@ describe('preset', () => { }, {}, ); - }).toThrowErrorMatchingSnapshot(); + }).toThrowError(/Unexpected token }/); }); test('works with "react-native"', () => {