Skip to content

Commit

Permalink
upgrade jest
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor committed Nov 22, 2021
1 parent 9ba7753 commit 77476f5
Show file tree
Hide file tree
Showing 6 changed files with 578 additions and 545 deletions.
6 changes: 1 addition & 5 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"babel-plugin-styled-components",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties"
]
"plugins": ["babel-plugin-styled-components"]
}
1 change: 1 addition & 0 deletions .jest.native.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"preset": "react-native",
"testEnvironment": "node",
"testRegex": "test/native/.*\\.spec\\.js$",
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
Expand Down
1 change: 1 addition & 0 deletions .jest.preact.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
},
"setupFilesAfterEnv": ["<rootDir>/test/preact/setup.js"],
"snapshotSerializers": ["enzyme-to-json/serializer"],
"testEnvironment": "jsdom",
"testRegex": "test/preact/.*\\.spec\\.js$"
}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-react": "^7.0.0",
"@testing-library/react": "^12.1.2",
"@types/styled-components": "^5.1.15",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.5",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.0.0",
"babel-jest": "^27.3.1",
"babel-plugin-styled-components": "^2.0.1",
"enzyme": "^3.6.0",
"enzyme-adapter-preact-pure": "^3.3.0",
Expand All @@ -43,7 +40,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"husky-v4": "^4.3.8",
"jest": "^26.0.0",
"jest": "^27.3.1",
"lint-staged": "^12.0.3",
"preact": "^10.0.0-beta.2",
"preact-render-to-json": "^3.6.6",
Expand Down Expand Up @@ -81,6 +78,7 @@
"snapshotSerializers": [
"enzyme-to-json/serializer"
],
"testEnvironment": "jsdom",
"testPathIgnorePatterns": [
"<rootDir>/test/native",
"<rootDir>/test/preact"
Expand Down
12 changes: 6 additions & 6 deletions test/preact/__snapshots__/styleSheetSerializer.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ exports[`basic: mount 1`] = `
background: papayawhip;
}
<styled.section>
<styleSheetSerializerspec__Wrapper>
<section
className="c0"
>
<styled.h1>
<styleSheetSerializerspec__Title>
Hello World, this is my first styled component!
</styled.h1>
</styleSheetSerializerspec__Title>
</section>
</styled.section>
</styleSheetSerializerspec__Wrapper>
`;

exports[`basic: shallow 1`] = `
Expand All @@ -26,8 +26,8 @@ exports[`basic: shallow 1`] = `
<section
className="c0"
>
<styled.h1>
<styleSheetSerializerspec__Title>
Hello World, this is my first styled component!
</styled.h1>
</styleSheetSerializerspec__Title>
</section>
`;
Loading

0 comments on commit 77476f5

Please sign in to comment.