@@ -19,17 +19,155 @@ test('passes import opts correctly', (t) => {
19
19
undo ( )
20
20
} )
21
21
22
- test ( 'passes cssnext opts correctly' , ( t ) => {
23
- const undo = cssStandardsRewired . __set__ ( 'cssnext' , ( opts ) => {
24
- t . is ( opts . browsers , 'test' )
25
- t . is ( opts . features , 'test' )
26
- t . is ( opts . warnForDuplicates , 'test' )
22
+ test ( 'passes customProperties opts correctly' , ( t ) => {
23
+ const undo = cssStandardsRewired . __set__ ( 'customProperties' , ( opts ) => {
24
+ t . is ( opts , 'test' )
25
+ } )
26
+ cssStandardsRewired ( { customProperties : 'test' } )
27
+ undo ( )
28
+ } )
29
+
30
+ test ( 'passes calc opts correctly' , ( t ) => {
31
+ const undo = cssStandardsRewired . __set__ ( 'calc' , ( opts ) => {
32
+ t . is ( opts , 'test' )
33
+ } )
34
+ cssStandardsRewired ( { calc : 'test' } )
35
+ undo ( )
36
+ } )
37
+
38
+ test ( 'passes imageSet opts correctly' , ( t ) => {
39
+ const undo = cssStandardsRewired . __set__ ( 'imageSet' , ( opts ) => {
40
+ t . is ( opts , 'test' )
41
+ } )
42
+ cssStandardsRewired ( { imageSet : 'test' } )
43
+ undo ( )
44
+ } )
45
+
46
+ test ( 'passes nesting opts correctly' , ( t ) => {
47
+ const undo = cssStandardsRewired . __set__ ( 'nesting' , ( opts ) => {
48
+ t . is ( opts , 'test' )
49
+ } )
50
+ cssStandardsRewired ( { nesting : 'test' } )
51
+ undo ( )
52
+ } )
53
+
54
+ test ( 'passes mediaQueriesRange opts correctly' , ( t ) => {
55
+ const undo = cssStandardsRewired . __set__ ( 'mediaQueriesRange' , ( opts ) => {
56
+ t . is ( opts , 'test' )
57
+ } )
58
+ cssStandardsRewired ( { mediaQueriesRange : 'test' } )
59
+ undo ( )
60
+ } )
61
+
62
+ test ( 'passes customSelectors opts correctly' , ( t ) => {
63
+ const undo = cssStandardsRewired . __set__ ( 'customSelectors' , ( opts ) => {
64
+ t . is ( opts , 'test' )
65
+ } )
66
+ cssStandardsRewired ( { customSelectors : 'test' } )
67
+ undo ( )
68
+ } )
69
+
70
+ test ( 'passes attributeCaseInsensitive opts correctly' , ( t ) => {
71
+ const undo = cssStandardsRewired . __set__ ( 'attributeCaseInsensitive' , ( opts ) => {
72
+ t . is ( opts , 'test' )
73
+ } )
74
+ cssStandardsRewired ( { attributeCaseInsensitive : 'test' } )
75
+ undo ( )
76
+ } )
77
+
78
+ test ( 'passes colorRebeccapurple opts correctly' , ( t ) => {
79
+ const undo = cssStandardsRewired . __set__ ( 'colorRebeccapurple' , ( opts ) => {
80
+ t . is ( opts , 'test' )
81
+ } )
82
+ cssStandardsRewired ( { colorRebeccapurple : 'test' } )
83
+ undo ( )
84
+ } )
85
+
86
+ test ( 'passes colorHwb opts correctly' , ( t ) => {
87
+ const undo = cssStandardsRewired . __set__ ( 'colorHwb' , ( opts ) => {
88
+ t . is ( opts , 'test' )
89
+ } )
90
+ cssStandardsRewired ( { colorHwb : 'test' } )
91
+ undo ( )
92
+ } )
93
+
94
+ test ( 'passes colorRgb opts correctly' , ( t ) => {
95
+ const undo = cssStandardsRewired . __set__ ( 'colorRgb' , ( opts ) => {
96
+ t . is ( opts , 'test' )
97
+ } )
98
+ cssStandardsRewired ( { colorRgb : 'test' } )
99
+ undo ( )
100
+ } )
101
+
102
+ test ( 'passes colorGray opts correctly' , ( t ) => {
103
+ const undo = cssStandardsRewired . __set__ ( 'colorGray' , ( opts ) => {
104
+ t . is ( opts , 'test' )
27
105
} )
28
- cssStandardsRewired ( {
29
- browsers : 'test' ,
30
- features : 'test' ,
31
- warnForDuplicates : 'test'
106
+ cssStandardsRewired ( { colorGray : 'test' } )
107
+ undo ( )
108
+ } )
109
+
110
+ test ( 'passes colorHexAlpha opts correctly' , ( t ) => {
111
+ const undo = cssStandardsRewired . __set__ ( 'colorHexAlpha' , ( opts ) => {
112
+ t . is ( opts , 'test' )
113
+ } )
114
+ cssStandardsRewired ( { colorHexAlpha : 'test' } )
115
+ undo ( )
116
+ } )
117
+
118
+ test ( 'passes colorFunction opts correctly' , ( t ) => {
119
+ const undo = cssStandardsRewired . __set__ ( 'colorFunction' , ( opts ) => {
120
+ t . is ( opts , 'test' )
121
+ } )
122
+ cssStandardsRewired ( { colorFunction : 'test' } )
123
+ undo ( )
124
+ } )
125
+
126
+ test ( 'passes fontFamilySystemUi opts correctly' , ( t ) => {
127
+ const undo = cssStandardsRewired . __set__ ( 'fontFamilySystemUi' , ( opts ) => {
128
+ t . is ( opts , 'test' )
129
+ } )
130
+ cssStandardsRewired ( { fontFamilySystemUi : 'test' } )
131
+ undo ( )
132
+ } )
133
+
134
+ test ( 'passes fontVariant opts correctly' , ( t ) => {
135
+ const undo = cssStandardsRewired . __set__ ( 'fontVariant' , ( opts ) => {
136
+ t . is ( opts , 'test' )
137
+ } )
138
+ cssStandardsRewired ( { fontVariant : 'test' } )
139
+ undo ( )
140
+ } )
141
+
142
+ test ( 'passes pseudoClassMatches opts correctly' , ( t ) => {
143
+ const undo = cssStandardsRewired . __set__ ( 'pseudoClassMatches' , ( opts ) => {
144
+ t . is ( opts , 'test' )
145
+ } )
146
+ cssStandardsRewired ( { pseudoClassMatches : 'test' } )
147
+ undo ( )
148
+ } )
149
+
150
+ test ( 'passes pseudoClassNot opts correctly' , ( t ) => {
151
+ const undo = cssStandardsRewired . __set__ ( 'pseudoClassNot' , ( opts ) => {
152
+ t . is ( opts , 'test' )
153
+ } )
154
+ cssStandardsRewired ( { pseudoClassNot : 'test' } )
155
+ undo ( )
156
+ } )
157
+
158
+ test ( 'passes pseudoClassAnyLink opts correctly' , ( t ) => {
159
+ const undo = cssStandardsRewired . __set__ ( 'pseudoClassAnyLink' , ( opts ) => {
160
+ t . is ( opts , 'test' )
161
+ } )
162
+ cssStandardsRewired ( { pseudoClassAnyLink : 'test' } )
163
+ undo ( )
164
+ } )
165
+
166
+ test ( 'passes autoprefixer opts correctly' , ( t ) => {
167
+ const undo = cssStandardsRewired . __set__ ( 'autoprefixer' , ( opts ) => {
168
+ t . is ( opts , 'test' )
32
169
} )
170
+ cssStandardsRewired ( { autoprefixer : 'test' } )
33
171
undo ( )
34
172
} )
35
173
@@ -43,12 +181,12 @@ test('passes rucksack opts correctly', (t) => {
43
181
44
182
test ( 'default plugins working' , ( t ) => {
45
183
const out = cssStandards ( )
46
- t . is ( out . plugins . length , 3 )
184
+ t . is ( out . plugins . length , 23 )
47
185
} )
48
186
49
187
test ( 'minify option working' , ( t ) => {
50
188
const out = cssStandards ( { minify : true } )
51
- t . is ( out . plugins . length , 4 )
189
+ t . is ( out . plugins . length , 24 )
52
190
t . is ( out . plugins [ out . plugins . length - 1 ] . postcssPlugin , 'cssnano' )
53
191
} )
54
192
0 commit comments