Skip to content

Commit fce9855

Browse files
committed
Split overriding tests snapshots into different files
1 parent de662fb commit fce9855

File tree

8 files changed

+620
-604
lines changed

8 files changed

+620
-604
lines changed

tests/__snapshots__/overriding.test.ts.snap

Lines changed: 0 additions & 601 deletions
This file was deleted.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`[[Mode: combined]] Overriding Tests: Basic 1`] = `
4+
"/* Mirror properties, do nothing */
5+
.test1 {
6+
padding-left: 10px;
7+
padding-right: 10px;
8+
}
9+
10+
/* Mirror properties, do nothing */
11+
.test2 {
12+
margin-left: 5px;
13+
margin-right: 5px;
14+
margin-left: 10px;
15+
margin-right: 10px;
16+
margin-left: 0;
17+
margin-right: 0;
18+
}
19+
20+
/* Flipped-declarations overriden by non-flipped declarations, do nothing */
21+
.test3 {
22+
text-align: left;
23+
text-align: right;
24+
text-align: center;
25+
}
26+
27+
/* Overriden mirror properties */
28+
.test4 {
29+
left: 0;
30+
right: 10px;
31+
}
32+
33+
[dir="ltr"] .test4 {
34+
left: 10px;
35+
right: 0;
36+
}
37+
38+
[dir="rtl"] .test4 {
39+
right: 10px;
40+
left: 0;
41+
}
42+
43+
/* Overriden with non-flippable declarations should move only the last one */
44+
.test5 {
45+
padding: 0 2px 0 4px;
46+
padding: 0 4px 0 8px;
47+
}
48+
49+
[dir="ltr"] .test5 {
50+
padding: 0 8px 0 16px;
51+
}
52+
53+
[dir="rtl"] .test5 {
54+
padding: 0 16px 0 8px;
55+
}
56+
57+
/* Overriden with flippable declarations should move all of them */
58+
[dir="ltr"] .test6 {
59+
margin-right: 1px;
60+
margin-right: 2px;
61+
margin-right: 3px;
62+
}
63+
64+
[dir="rtl"] .test6 {
65+
margin-left: 1px;
66+
margin-left: 2px;
67+
margin-left: 3px;
68+
}
69+
70+
/* Overriden with flippable declarations but a counterpart flipped declaration should move only the last one */
71+
.test7 {
72+
margin-right: 1px;
73+
margin-right: 2px;
74+
}
75+
76+
[dir="ltr"] .test7 {
77+
margin-left: 4px;
78+
margin-right: 3px;
79+
}
80+
81+
[dir="rtl"] .test7 {
82+
margin-right: 4px;
83+
margin-left: 3px;
84+
}
85+
86+
.test8 {
87+
margin-right: 1px;
88+
margin-right: 2px;
89+
}
90+
91+
[dir="ltr"] .test8 {
92+
margin-left: 4px;
93+
margin-right: 3px;
94+
}
95+
96+
[dir="rtl"] .test8 {
97+
margin-right: 4px;
98+
margin-left: 3px;
99+
}
100+
101+
/* Overriden with flippable declarations but a counterpart flipped declaration should move only the last one even if there is a mirror */
102+
.test9 {
103+
margin-right: 1px;
104+
margin-right: 2px;
105+
}
106+
107+
[dir="ltr"] .test9 {
108+
margin-left: 1px;
109+
margin-right: 3px;
110+
}
111+
112+
[dir="rtl"] .test9 {
113+
margin-right: 1px;
114+
margin-left: 3px;
115+
}
116+
117+
/* Overriden should behave correctly with safeBothPrefix */
118+
.test10 {
119+
padding-top: 4px;
120+
padding-bottom: 4px;
121+
padding-left: 8px;
122+
padding-right: 8px;
123+
padding-top: 4px;
124+
padding-bottom: 4px;
125+
padding-left: 8px;
126+
padding-right: 8px;
127+
}"
128+
`;
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`[[Mode: combined]] Overriding Tests: With safeBothPrefix 1`] = `
4+
"/* Mirror properties, do nothing */
5+
[dir] .test1 {
6+
padding-left: 10px;
7+
padding-right: 10px;
8+
}
9+
10+
/* Mirror properties, do nothing */
11+
.test2 {
12+
margin-left: 5px;
13+
margin-right: 5px;
14+
margin-left: 10px;
15+
margin-right: 10px;
16+
}
17+
18+
[dir] .test2 {
19+
margin-left: 0;
20+
margin-right: 0;
21+
}
22+
23+
/* Flipped-declarations overriden by non-flipped declarations, do nothing */
24+
.test3 {
25+
text-align: left;
26+
text-align: right;
27+
}
28+
29+
[dir] .test3 {
30+
text-align: center;
31+
}
32+
33+
/* Overriden mirror properties */
34+
.test4 {
35+
left: 0;
36+
right: 10px;
37+
}
38+
39+
[dir="ltr"] .test4 {
40+
left: 10px;
41+
right: 0;
42+
}
43+
44+
[dir="rtl"] .test4 {
45+
right: 10px;
46+
left: 0;
47+
}
48+
49+
/* Overriden with non-flippable declarations should move only the last one */
50+
.test5 {
51+
padding: 0 2px 0 4px;
52+
padding: 0 4px 0 8px;
53+
}
54+
55+
[dir="ltr"] .test5 {
56+
padding: 0 8px 0 16px;
57+
}
58+
59+
[dir="rtl"] .test5 {
60+
padding: 0 16px 0 8px;
61+
}
62+
63+
/* Overriden with flippable declarations should move all of them */
64+
[dir="ltr"] .test6 {
65+
margin-right: 1px;
66+
margin-right: 2px;
67+
margin-right: 3px;
68+
}
69+
70+
[dir="rtl"] .test6 {
71+
margin-left: 1px;
72+
margin-left: 2px;
73+
margin-left: 3px;
74+
}
75+
76+
/* Overriden with flippable declarations but a counterpart flipped declaration should move only the last one */
77+
.test7 {
78+
margin-right: 1px;
79+
margin-right: 2px;
80+
}
81+
82+
[dir="ltr"] .test7 {
83+
margin-left: 4px;
84+
margin-right: 3px;
85+
}
86+
87+
[dir="rtl"] .test7 {
88+
margin-right: 4px;
89+
margin-left: 3px;
90+
}
91+
92+
.test8 {
93+
margin-right: 1px;
94+
margin-right: 2px;
95+
}
96+
97+
[dir="ltr"] .test8 {
98+
margin-left: 4px;
99+
margin-right: 3px;
100+
}
101+
102+
[dir="rtl"] .test8 {
103+
margin-right: 4px;
104+
margin-left: 3px;
105+
}
106+
107+
/* Overriden with flippable declarations but a counterpart flipped declaration should move only the last one even if there is a mirror */
108+
.test9 {
109+
margin-right: 1px;
110+
margin-right: 2px;
111+
}
112+
113+
[dir="ltr"] .test9 {
114+
margin-left: 1px;
115+
margin-right: 3px;
116+
}
117+
118+
[dir="rtl"] .test9 {
119+
margin-right: 1px;
120+
margin-left: 3px;
121+
}
122+
123+
/* Overriden should behave correctly with safeBothPrefix */
124+
.test10 {
125+
padding-top: 4px;
126+
padding-bottom: 4px;
127+
padding-left: 8px;
128+
padding-right: 8px;
129+
}
130+
131+
[dir] .test10 {
132+
padding-top: 4px;
133+
padding-bottom: 4px;
134+
padding-left: 8px;
135+
padding-right: 8px;
136+
}"
137+
`;
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`[[Mode: diff]] Overriding Tests: Basic 1`] = `
4+
".test4 {
5+
right: 10px;
6+
left: 0;
7+
}
8+
9+
.test5 {
10+
padding: 0 16px 0 8px;
11+
}
12+
13+
.test6 {
14+
margin-right: 0;
15+
margin-left: 1px;
16+
margin-left: 2px;
17+
margin-left: 3px;
18+
}
19+
20+
.test7 {
21+
margin-right: 4px;
22+
margin-left: 3px;
23+
}
24+
25+
.test8 {
26+
margin-right: 4px;
27+
margin-left: 3px;
28+
}
29+
30+
.test9 {
31+
margin-right: 1px;
32+
margin-left: 3px;
33+
}"
34+
`;
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`[[Mode: diff]] Overriding Tests: With safeBothPrefix 1`] = `
4+
".test1 {
5+
padding-left: 10px;
6+
padding-right: 10px;
7+
}
8+
9+
.test2 {
10+
margin-left: 0;
11+
margin-right: 0;
12+
}
13+
14+
.test3 {
15+
text-align: center;
16+
}
17+
18+
.test4 {
19+
right: 10px;
20+
left: 0;
21+
}
22+
23+
.test5 {
24+
padding: 0 16px 0 8px;
25+
}
26+
27+
.test6 {
28+
margin-right: 0;
29+
margin-left: 1px;
30+
margin-left: 2px;
31+
margin-left: 3px;
32+
}
33+
34+
.test7 {
35+
margin-right: 4px;
36+
margin-left: 3px;
37+
}
38+
39+
.test8 {
40+
margin-right: 4px;
41+
margin-left: 3px;
42+
}
43+
44+
.test9 {
45+
margin-right: 1px;
46+
margin-left: 3px;
47+
}
48+
49+
.test10 {
50+
padding-top: 4px;
51+
padding-bottom: 4px;
52+
padding-left: 8px;
53+
padding-right: 8px;
54+
}"
55+
`;

0 commit comments

Comments
 (0)