Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit bcb38a5

Browse files
added jest-emotion
1 parent f821301 commit bcb38a5

File tree

4 files changed

+80
-8
lines changed

4 files changed

+80
-8
lines changed

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
globals: {
55
NODE_ENV: 'test',
66
},
7-
snapshotSerializers: ['enzyme-to-json/serializer'],
7+
snapshotSerializers: ['enzyme-to-json/serializer', 'jest-emotion'],
88
transform: {
99
'^.+\\.(j|t)sx?$': 'babel-jest',
1010
},

package-lock.json

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"eslint-plugin-react": "^7.14.2",
6969
"eslint-plugin-react-hooks": "^1.6.1",
7070
"jest": "^24.8.0",
71+
"jest-emotion": "^10.0.14",
7172
"lodash": "^4.17.14",
7273
"prettier": "^1.18.2",
7374
"typescript": "^3.5.3"
Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,71 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`Loading should render without error 1`] = `
4+
.emotion-3 {
5+
box-sizing: border-box;
6+
margin-top: 2.5rem;
7+
margin-bottom: 2.5rem;
8+
margin-left: auto;
9+
margin-right: auto;
10+
display: -webkit-box;
11+
display: -webkit-flex;
12+
display: -ms-flexbox;
13+
display: flex;
14+
max-width: 11.25rem;
15+
height: 2.5rem;
16+
width: 100%;
17+
-webkit-flex-flow: row;
18+
-ms-flex-flow: row;
19+
flex-flow: row;
20+
-webkit-box-pack: space-evenly;
21+
-webkit-justify-content: space-evenly;
22+
-ms-flex-pack: space-evenly;
23+
justify-content: space-evenly;
24+
-webkit-align-items: center;
25+
-webkit-box-align: center;
26+
-ms-flex-align: center;
27+
align-items: center;
28+
}
29+
30+
.emotion-3 > div {
31+
width: 1.25rem;
32+
height: 1.25rem;
33+
opacity: 0.5;
34+
background-color: skyblue;
35+
-webkit-animation-name: scale;
36+
animation-name: scale;
37+
-webkit-animation-duration: 1200ms;
38+
animation-duration: 1200ms;
39+
-webkit-animation-iteration-count: infinite;
40+
animation-iteration-count: infinite;
41+
}
42+
43+
.emotion-0 {
44+
-webkit-animation-delay: 0ms;
45+
animation-delay: 0ms;
46+
}
47+
48+
.emotion-1 {
49+
-webkit-animation-delay: 400ms;
50+
animation-delay: 400ms;
51+
}
52+
53+
.emotion-2 {
54+
-webkit-animation-delay: 800ms;
55+
animation-delay: 800ms;
56+
}
57+
458
<div
5-
className="jsx-551631717"
59+
className="emotion-3"
660
>
761
<div
8-
className="jsx-660240691"
9-
key="jsx-660240691"
62+
className="emotion-0"
1063
/>
1164
<div
12-
className="jsx-4081925047"
13-
key="jsx-4081925047"
65+
className="emotion-1"
1466
/>
1567
<div
16-
className="jsx-4206995259"
17-
key="jsx-4206995259"
68+
className="emotion-2"
1869
/>
1970
</div>
2071
`;

0 commit comments

Comments
 (0)