Skip to content

Commit 907aed8

Browse files
test: refactor (#440)
1 parent 28e1628 commit 907aed8

8 files changed

+177
-177
lines changed

test/__snapshots__/attributes-option.test.js.snap

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`attributes option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
3+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
44
"<!DOCTYPE html><html><head>
55
<title>style-loader test</title>
66
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -20,11 +20,11 @@ h1 {
2020
</body></html>"
2121
`;
2222
23-
exports[`attributes option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
23+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
2424
25-
exports[`attributes option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
25+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
2626
27-
exports[`attributes option should add attributes to tag when the "injectType" option is "lazyStyleTag": DOM 1`] = `
27+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazyStyleTag": DOM 1`] = `
2828
"<!DOCTYPE html><html><head>
2929
<title>style-loader test</title>
3030
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -44,11 +44,11 @@ exports[`attributes option should add attributes to tag when the "injectType" op
4444
</body></html>"
4545
`;
4646
47-
exports[`attributes option should add attributes to tag when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
47+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
4848
49-
exports[`attributes option should add attributes to tag when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
49+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
5050
51-
exports[`attributes option should add attributes to tag when the "injectType" option is "linkTag": DOM 1`] = `
51+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "linkTag": DOM 1`] = `
5252
"<!DOCTYPE html><html><head>
5353
<title>style-loader test</title>
5454
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -62,11 +62,11 @@ exports[`attributes option should add attributes to tag when the "injectType" op
6262
</body></html>"
6363
`;
6464
65-
exports[`attributes option should add attributes to tag when the "injectType" option is "linkTag": errors 1`] = `Array []`;
65+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "linkTag": errors 1`] = `Array []`;
6666
67-
exports[`attributes option should add attributes to tag when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
67+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
6868
69-
exports[`attributes option should add attributes to tag when the "injectType" option is "singletonStyleTag": DOM 1`] = `
69+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "singletonStyleTag": DOM 1`] = `
7070
"<!DOCTYPE html><html><head>
7171
<title>style-loader test</title>
7272
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -86,11 +86,11 @@ h1 {
8686
</body></html>"
8787
`;
8888
89-
exports[`attributes option should add attributes to tag when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
89+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
9090
91-
exports[`attributes option should add attributes to tag when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
91+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
9292
93-
exports[`attributes option should add attributes to tag when the "injectType" option is "styleTag": DOM 1`] = `
93+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "styleTag": DOM 1`] = `
9494
"<!DOCTYPE html><html><head>
9595
<title>style-loader test</title>
9696
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -110,11 +110,11 @@ exports[`attributes option should add attributes to tag when the "injectType" op
110110
</body></html>"
111111
`;
112112
113-
exports[`attributes option should add attributes to tag when the "injectType" option is "styleTag": errors 1`] = `Array []`;
113+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "styleTag": errors 1`] = `Array []`;
114114
115-
exports[`attributes option should add attributes to tag when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
115+
exports[`"attributes" option should add attributes to tag when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
116116
117-
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: DOM 1`] = `
117+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: DOM 1`] = `
118118
"<!DOCTYPE html><html><head>
119119
<title>style-loader test</title>
120120
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -131,11 +131,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
131131
</body></html>"
132132
`;
133133
134-
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: errors 1`] = `Array []`;
134+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: errors 1`] = `Array []`;
135135
136-
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: warnings 1`] = `Array []`;
136+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: warnings 1`] = `Array []`;
137137
138-
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
138+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
139139
"<!DOCTYPE html><html><head>
140140
<title>style-loader test</title>
141141
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -152,11 +152,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
152152
</body></html>"
153153
`;
154154
155-
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
155+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
156156
157-
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
157+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
158158
159-
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: DOM 1`] = `
159+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: DOM 1`] = `
160160
"<!DOCTYPE html><html><head>
161161
<title>style-loader test</title>
162162
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -173,11 +173,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
173173
</body></html>"
174174
`;
175175
176-
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: errors 1`] = `Array []`;
176+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: errors 1`] = `Array []`;
177177
178-
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: warnings 1`] = `Array []`;
178+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: warnings 1`] = `Array []`;
179179
180-
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag": DOM 1`] = `
180+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag": DOM 1`] = `
181181
"<!DOCTYPE html><html><head>
182182
<title>style-loader test</title>
183183
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -194,11 +194,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
194194
</body></html>"
195195
`;
196196
197-
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
197+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
198198
199-
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
199+
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
200200
201-
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag" #2: DOM 1`] = `
201+
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag" #2: DOM 1`] = `
202202
"<!DOCTYPE html><html><head>
203203
<title>style-loader test</title>
204204
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -212,11 +212,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
212212
</body></html>"
213213
`;
214214
215-
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag" #2: errors 1`] = `Array []`;
215+
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag" #2: errors 1`] = `Array []`;
216216
217-
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag" #2: warnings 1`] = `Array []`;
217+
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag" #2: warnings 1`] = `Array []`;
218218
219-
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag": DOM 1`] = `
219+
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag": DOM 1`] = `
220220
"<!DOCTYPE html><html><head>
221221
<title>style-loader test</title>
222222
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -230,11 +230,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
230230
</body></html>"
231231
`;
232232
233-
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag": errors 1`] = `Array []`;
233+
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag": errors 1`] = `Array []`;
234234
235-
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag": warnings 1`] = `Array []`;
235+
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag": warnings 1`] = `Array []`;
236236
237-
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: DOM 1`] = `
237+
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: DOM 1`] = `
238238
"<!DOCTYPE html><html><head>
239239
<title>style-loader test</title>
240240
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -251,11 +251,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
251251
</body></html>"
252252
`;
253253
254-
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: errors 1`] = `Array []`;
254+
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: errors 1`] = `Array []`;
255255
256-
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: warnings 1`] = `Array []`;
256+
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: warnings 1`] = `Array []`;
257257
258-
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag": DOM 1`] = `
258+
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag": DOM 1`] = `
259259
"<!DOCTYPE html><html><head>
260260
<title>style-loader test</title>
261261
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -272,11 +272,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
272272
</body></html>"
273273
`;
274274
275-
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
275+
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
276276
277-
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
277+
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
278278
279-
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag" #2: DOM 1`] = `
279+
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag" #2: DOM 1`] = `
280280
"<!DOCTYPE html><html><head>
281281
<title>style-loader test</title>
282282
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -293,11 +293,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
293293
</body></html>"
294294
`;
295295
296-
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag" #2: errors 1`] = `Array []`;
296+
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag" #2: errors 1`] = `Array []`;
297297
298-
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag" #2: warnings 1`] = `Array []`;
298+
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag" #2: warnings 1`] = `Array []`;
299299
300-
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag": DOM 1`] = `
300+
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag": DOM 1`] = `
301301
"<!DOCTYPE html><html><head>
302302
<title>style-loader test</title>
303303
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -314,6 +314,6 @@ exports[`attributes option should add nonce attribute when "injectType" option i
314314
</body></html>"
315315
`;
316316
317-
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag": errors 1`] = `Array []`;
317+
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag": errors 1`] = `Array []`;
318318
319-
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag": warnings 1`] = `Array []`;
319+
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag": warnings 1`] = `Array []`;

test/__snapshots__/base-option.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`base option should work: DOM 1`] = `
3+
exports[`"base" option should work: DOM 1`] = `
44
"<!DOCTYPE html><html><head>
55
<title>style-loader test</title>
66
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -20,6 +20,6 @@ exports[`base option should work: DOM 1`] = `
2020
</body></html>"
2121
`;
2222
23-
exports[`base option should work: errors 1`] = `Array []`;
23+
exports[`"base" option should work: errors 1`] = `Array []`;
2424
25-
exports[`base option should work: warnings 1`] = `Array []`;
25+
exports[`"base" option should work: warnings 1`] = `Array []`;

test/__snapshots__/injectType-option.test.js.snap

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`injectType option should work when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
3+
exports[`"injectType" option should work when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
44
"<!DOCTYPE html><html><head>
55
<title>style-loader test</title>
66
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -20,11 +20,11 @@ h1 {
2020
</body></html>"
2121
`;
2222
23-
exports[`injectType option should work when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
23+
exports[`"injectType" option should work when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
2424
25-
exports[`injectType option should work when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
25+
exports[`"injectType" option should work when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
2626
27-
exports[`injectType option should work when the "injectType" option is "lazyStyleTag": DOM 1`] = `
27+
exports[`"injectType" option should work when the "injectType" option is "lazyStyleTag": DOM 1`] = `
2828
"<!DOCTYPE html><html><head>
2929
<title>style-loader test</title>
3030
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -44,11 +44,11 @@ exports[`injectType option should work when the "injectType" option is "lazyStyl
4444
</body></html>"
4545
`;
4646
47-
exports[`injectType option should work when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
47+
exports[`"injectType" option should work when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
4848
49-
exports[`injectType option should work when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
49+
exports[`"injectType" option should work when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
5050
51-
exports[`injectType option should work when the "injectType" option is "linkTag": DOM 1`] = `
51+
exports[`"injectType" option should work when the "injectType" option is "linkTag": DOM 1`] = `
5252
"<!DOCTYPE html><html><head>
5353
<title>style-loader test</title>
5454
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -62,11 +62,11 @@ exports[`injectType option should work when the "injectType" option is "linkTag"
6262
</body></html>"
6363
`;
6464
65-
exports[`injectType option should work when the "injectType" option is "linkTag": errors 1`] = `Array []`;
65+
exports[`"injectType" option should work when the "injectType" option is "linkTag": errors 1`] = `Array []`;
6666
67-
exports[`injectType option should work when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
67+
exports[`"injectType" option should work when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
6868
69-
exports[`injectType option should work when the "injectType" option is "singletonStyleTag": DOM 1`] = `
69+
exports[`"injectType" option should work when the "injectType" option is "singletonStyleTag": DOM 1`] = `
7070
"<!DOCTYPE html><html><head>
7171
<title>style-loader test</title>
7272
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -86,11 +86,11 @@ h1 {
8686
</body></html>"
8787
`;
8888
89-
exports[`injectType option should work when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
89+
exports[`"injectType" option should work when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
9090
91-
exports[`injectType option should work when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
91+
exports[`"injectType" option should work when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
9292
93-
exports[`injectType option should work when the "injectType" option is "styleTag": DOM 1`] = `
93+
exports[`"injectType" option should work when the "injectType" option is "styleTag": DOM 1`] = `
9494
"<!DOCTYPE html><html><head>
9595
<title>style-loader test</title>
9696
<style id=\\"existing-style\\">.existing { color: yellow }</style>
@@ -110,6 +110,6 @@ exports[`injectType option should work when the "injectType" option is "styleTag
110110
</body></html>"
111111
`;
112112
113-
exports[`injectType option should work when the "injectType" option is "styleTag": errors 1`] = `Array []`;
113+
exports[`"injectType" option should work when the "injectType" option is "styleTag": errors 1`] = `Array []`;
114114
115-
exports[`injectType option should work when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
115+
exports[`"injectType" option should work when the "injectType" option is "styleTag": warnings 1`] = `Array []`;

0 commit comments

Comments
 (0)