Skip to content

Commit

Permalink
test: refactor (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Dec 18, 2019
1 parent 28e1628 commit 907aed8
Show file tree
Hide file tree
Showing 8 changed files with 177 additions and 177 deletions.
90 changes: 45 additions & 45 deletions test/__snapshots__/attributes-option.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`attributes option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -20,11 +20,11 @@ h1 {
</body></html>"
`;
exports[`attributes option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "lazyStyleTag": DOM 1`] = `
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazyStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -44,11 +44,11 @@ exports[`attributes option should add attributes to tag when the "injectType" op
</body></html>"
`;
exports[`attributes option should add attributes to tag when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "linkTag": DOM 1`] = `
exports[`"attributes" option should add attributes to tag when the "injectType" option is "linkTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -62,11 +62,11 @@ exports[`attributes option should add attributes to tag when the "injectType" op
</body></html>"
`;
exports[`attributes option should add attributes to tag when the "injectType" option is "linkTag": errors 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "linkTag": errors 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "singletonStyleTag": DOM 1`] = `
exports[`"attributes" option should add attributes to tag when the "injectType" option is "singletonStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -86,11 +86,11 @@ h1 {
</body></html>"
`;
exports[`attributes option should add attributes to tag when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "styleTag": DOM 1`] = `
exports[`"attributes" option should add attributes to tag when the "injectType" option is "styleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -110,11 +110,11 @@ exports[`attributes option should add attributes to tag when the "injectType" op
</body></html>"
`;
exports[`attributes option should add attributes to tag when the "injectType" option is "styleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "styleTag": errors 1`] = `Array []`;
exports[`attributes option should add attributes to tag when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add attributes to tag when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -131,11 +131,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag" #2: warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -152,11 +152,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -173,11 +173,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag" #2: warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag": DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -194,11 +194,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag" #2: DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag" #2: DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -212,11 +212,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag" #2: errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag" #2: errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag" #2: warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag" #2: warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag": DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -230,11 +230,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag": errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag": errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "linkTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "linkTag": warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -251,11 +251,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag" #2: warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag": DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -272,11 +272,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag" #2: DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag" #2: DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -293,11 +293,11 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag" #2: errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag" #2: errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag" #2: warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag" #2: warnings 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag": DOM 1`] = `
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -314,6 +314,6 @@ exports[`attributes option should add nonce attribute when "injectType" option i
</body></html>"
`;
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag": errors 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag": errors 1`] = `Array []`;
exports[`attributes option should add nonce attribute when "injectType" option is "styleTag": warnings 1`] = `Array []`;
exports[`"attributes" option should add nonce attribute when "injectType" option is "styleTag": warnings 1`] = `Array []`;
6 changes: 3 additions & 3 deletions test/__snapshots__/base-option.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`base option should work: DOM 1`] = `
exports[`"base" option should work: DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -20,6 +20,6 @@ exports[`base option should work: DOM 1`] = `
</body></html>"
`;
exports[`base option should work: errors 1`] = `Array []`;
exports[`"base" option should work: errors 1`] = `Array []`;
exports[`base option should work: warnings 1`] = `Array []`;
exports[`"base" option should work: warnings 1`] = `Array []`;
30 changes: 15 additions & 15 deletions test/__snapshots__/injectType-option.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`injectType option should work when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
exports[`"injectType" option should work when the "injectType" option is "lazySingletonStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -20,11 +20,11 @@ h1 {
</body></html>"
`;
exports[`injectType option should work when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "lazySingletonStyleTag": errors 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "lazySingletonStyleTag": warnings 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "lazyStyleTag": DOM 1`] = `
exports[`"injectType" option should work when the "injectType" option is "lazyStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -44,11 +44,11 @@ exports[`injectType option should work when the "injectType" option is "lazyStyl
</body></html>"
`;
exports[`injectType option should work when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "lazyStyleTag": errors 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "lazyStyleTag": warnings 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "linkTag": DOM 1`] = `
exports[`"injectType" option should work when the "injectType" option is "linkTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -62,11 +62,11 @@ exports[`injectType option should work when the "injectType" option is "linkTag"
</body></html>"
`;
exports[`injectType option should work when the "injectType" option is "linkTag": errors 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "linkTag": errors 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "linkTag": warnings 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "singletonStyleTag": DOM 1`] = `
exports[`"injectType" option should work when the "injectType" option is "singletonStyleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -86,11 +86,11 @@ h1 {
</body></html>"
`;
exports[`injectType option should work when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "singletonStyleTag": errors 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "singletonStyleTag": warnings 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "styleTag": DOM 1`] = `
exports[`"injectType" option should work when the "injectType" option is "styleTag": DOM 1`] = `
"<!DOCTYPE html><html><head>
<title>style-loader test</title>
<style id=\\"existing-style\\">.existing { color: yellow }</style>
Expand All @@ -110,6 +110,6 @@ exports[`injectType option should work when the "injectType" option is "styleTag
</body></html>"
`;
exports[`injectType option should work when the "injectType" option is "styleTag": errors 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "styleTag": errors 1`] = `Array []`;
exports[`injectType option should work when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
exports[`"injectType" option should work when the "injectType" option is "styleTag": warnings 1`] = `Array []`;
Loading

0 comments on commit 907aed8

Please sign in to comment.