Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade jest from 26.6.0 to 27.0.0-next.6 #10748

Closed
wants to merge 10 commits into from
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"get-port": "^5.1.1",
"globby": "^11.0.1",
"husky": "^4.3.0",
"jest": "26.6.0",
"jest": "27.0.3",
"lerna": "3.22.1",
"lerna-changelog": "~0.8.2",
"lint-staged": "^10.4.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-named-asset-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"babel-plugin-tester": "^8.0.1",
"jest": "26.6.0"
"jest": "27.0.3"
},
"scripts": {
"test": "jest"
Expand Down
2 changes: 1 addition & 1 deletion packages/confusing-browser-globals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"index.js"
],
"devDependencies": {
"jest": "26.6.0"
"jest": "27.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"jest": "26.6.0"
"jest": "27.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
"devDependencies": {
"cross-env": "^7.0.2",
"jest": "26.6.0"
"jest": "27.0.3"
},
"scripts": {
"test": "cross-env FORCE_COLOR=true jest"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-error-overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"eslint-plugin-testing-library": "^3.9.2",
"flow-bin": "^0.116.0",
"html-entities": "1.3.1",
"jest": "26.6.0",
"jest": "27.0.3",
"jest-fetch-mock": "2.1.2",
"object-assign": "4.1.1",
"promise": "8.1.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/react-error-overlay/src/__tests__/get-source-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @jest-environment jsdom
*/

import { getSourceMap } from '../utils/getSourceMap';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/config/jest/babelTransform.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// @remove-on-eject-end
'use strict';

const babelJest = require('babel-jest');
const babelJest = require('babel-jest').default;

const hasJsxRuntime = (() => {
if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/fixtures/kitchensink/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"package": {
"dependencies": {
"bootstrap": "4.3.1",
"jest": "26.6.0",
"jest": "27.0.3",
"node-sass": "4.x",
"normalize.css": "7.0.0",
"prop-types": "15.7.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const babelOptions = { presets: ['react-app'] };

module.exports = require('babel-jest').createTransformer(babelOptions);
const babelJest = require('babel-jest').default;

module.exports = babelJest.createTransformer(babelOptions);
5 changes: 2 additions & 3 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@
"fs-extra": "^9.0.1",
"html-webpack-plugin": "4.5.0",
"identity-obj-proxy": "3.0.0",
"jest": "26.6.0",
"jest-circus": "26.6.0",
"jest-resolve": "26.6.0",
"jest": "27.0.3",
"jest-resolve": "27.0.3",
"jest-watch-typeahead": "0.6.1",
"mini-css-extract-plugin": "0.11.3",
"optimize-css-assets-webpack-plugin": "5.0.4",
Expand Down
1 change: 0 additions & 1 deletion packages/react-scripts/scripts/utils/createJestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ module.exports = (resolve, rootDir, isEjecting) => {
'<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}',
],
testEnvironment: 'jsdom',
testRunner: require.resolve('jest-circus/runner'),
transform: {
'^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': resolve(
'config/jest/babelTransform.js'
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/__shared__/test-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ afterAll(async () => {
await testSetup.teardown();
});

beforeEach(() => jest.setTimeout(1000 * 60 * 5));
jest.setTimeout(1000 * 60 * 15);

module.exports = testSetup;