-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
Description
I have updated react to 17 and configured babel to new automatic runtime. Jest stopped working.
Whats the issue here?

Code:
"scripts": {
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
},
"jest": {
"roots": [
"<rootDir>/src"
],
"moduleNameMapper": {
"\\.(css|scss|sass)$": "identity-obj-proxy"
},
"setupFilesAfterEnv": ['./test.js'],
"transform": {
"\\.[jt]sx?$": "babel-jest"
},
"testEnvironment": "jest-environment-node",
"modulePaths": [],
}
import Enzyme from "enzyme";
import Adapter from "enzyme-adapter-react-16";
Enzyme.configure({ adapter: new Adapter() });
{
"presets": [
[
"@babel/preset-react",
{
"runtime": "automatic"
}
]
]
}
import { mount } from 'enzyme';
it("renders", () => {
const wrapper = mount(<div />);
});
Tay0108, val2207, benmonro, mlukasik-dev, yuri-sakharov and 1 more