Skip to content

Commit

Permalink
chore(tests): fix tests by installing jest-environment-jsdom-sixteen
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerard Brull committed May 12, 2020
1 parent ec6177d commit e9e1013
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 23 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"compile:code": "rollup --config ./etc/rollup/config.js",
"compile:clean": "rm -rf es cjs types",
"compile:types": "tsc --p ./tsconfig.types.json",
"test": "react-scripts test",
"test": "react-scripts test --env=jest-environment-jsdom-sixteen",
"format": "prettier -l --write \"**/*.{ts,tsx,js,jsx,json,less,css,md}\"",
"format:fix": "yarn format --write",
"lint": "eslint 'src/**/*.{ts,tsx}'",
Expand Down Expand Up @@ -59,7 +59,7 @@
"@semantic-release/git": "7.0.18",
"@testing-library/jest-dom": "^5.7.0",
"@testing-library/react": "^10.0.4",
"@testing-library/react-hooks": "3.2.1",
"@testing-library/react-hooks": "^3.2.1",
"@types/jest-axe": "^3.2.1",
"@types/lodash.throttle": "4.1.6",
"@types/node": "12.12.38",
Expand All @@ -78,6 +78,7 @@
"gh-pages": "2.2.0",
"husky": "4.2.5",
"jest-axe": "3.3.0",
"jest-environment-jsdom-sixteen": "^1.0.3",
"jest-junit": "10.0.0",
"jest-styled-components": "6.3.4",
"lint-staged": "10.2.2",
Expand All @@ -87,7 +88,7 @@
"react-dom": "16.13.1",
"react-scripts": "^3.4.1",
"react-styleguidist": "^11.0.6",
"react-test-renderer": "16.13.1",
"react-test-renderer": "^16.13.1",
"rollup": "2.8.2",
"rollup-plugin-postcss": "2.9.0",
"rollup-plugin-terser": "5.3.0",
Expand Down
8 changes: 4 additions & 4 deletions src/components/atoms/Alert/__snapshots__/Alert.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ exports[`Alert renders the component with no props and no a11y violations 1`] =
</div>
`;

exports[`Alert renders with specific severity: "alert" 1`] = `
exports[`Alert renders with specific severity: alert 1`] = `
.c0 {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -122,7 +122,7 @@ exports[`Alert renders with specific severity: "alert" 1`] = `
</div>
`;

exports[`Alert renders with specific severity: "info" 1`] = `
exports[`Alert renders with specific severity: info 1`] = `
.c0 {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -183,7 +183,7 @@ exports[`Alert renders with specific severity: "info" 1`] = `
</div>
`;

exports[`Alert renders with specific severity: "success" 1`] = `
exports[`Alert renders with specific severity: success 1`] = `
.c0 {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -244,7 +244,7 @@ exports[`Alert renders with specific severity: "success" 1`] = `
</div>
`;

exports[`Alert renders with specific severity: "warning" 1`] = `
exports[`Alert renders with specific severity: warning 1`] = `
.c0 {
display: -webkit-box;
display: -webkit-flex;
Expand Down
4 changes: 2 additions & 2 deletions src/components/atoms/Badge/__snapshots__/Badge.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports[`<Badge /> renders with no a11y violations 1`] = `
</span>
`;

exports[`<Badge /> renders with specific size: "medium" 1`] = `
exports[`<Badge /> renders with specific size: medium 1`] = `
.c0 {
margin: 0;
-webkit-letter-spacing: 0;
Expand Down Expand Up @@ -60,7 +60,7 @@ exports[`<Badge /> renders with specific size: "medium" 1`] = `
</span>
`;

exports[`<Badge /> renders with specific size: "small" 1`] = `
exports[`<Badge /> renders with specific size: small 1`] = `
.c0 {
margin: 0;
-webkit-letter-spacing: 0;
Expand Down
4 changes: 2 additions & 2 deletions src/components/atoms/Text/__snapshots__/Text.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Text /> it can render as an HTML "p" tag 1`] = `
exports[`<Text /> it can render as an HTML p tag 1`] = `
.c0 {
margin: 0;
-webkit-letter-spacing: 0;
Expand All @@ -21,7 +21,7 @@ exports[`<Text /> it can render as an HTML "p" tag 1`] = `
</p>
`;

exports[`<Text /> it can render as an HTML "span" tag 1`] = `
exports[`<Text /> it can render as an HTML span tag 1`] = `
.c0 {
margin: 0;
-webkit-letter-spacing: 0;
Expand Down
1 change: 1 addition & 0 deletions src/styleguide-components/Logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const LogoTitle = styled.h1`
text-align: center;
height: 50px;
width: 170px;
margin: 0 auto;
&:hover rect {
-webkit-animation: 0.5s draw linear forwards;
animation: 0.5s draw linear forwards;
Expand Down
Loading

0 comments on commit e9e1013

Please sign in to comment.