11// Jest Snapshot v1, https://goo.gl/fbAQLP
22
3+ exports [` addStyle should insert style tag in iframe 1` ] = ` "<head ><title >Title</title ></head ><body ><h1 >Hello world</h1 ><iframe class =\\"iframeTarget\\"></iframe></body>"`;
4+
5+ exports[`addStyle should insert style tag in iframe 2`] = `"<style type =\\"text/css\\">.foo { color : red } </style>"`;
6+
7+ exports[`addStyle should throw error with invalid " insertAt" option 1`] = `
8+ " [Style Loader]
9+
10+ Invalid value for parameter 'insertAt' ('options.insertAt') found.
11+ Must be 'top', 'bottom', or Object.
12+ (https://github.com/webpack-contrib/style-loader#insertat)
13+ "
14+ `;
15+
16+ exports[`addStyle should throw error with invalid " insertInto" option 1`] = `"'#test><><><' is not a valid selector"`;
17+
18+ exports[`addStyle should throw error with invalid " insertInto" option 2`] = `"Couldn't find a style target. This probably means that the value for the ' insertInto' parameter is invalid."`;
19+
20+ exports[`addStyle should work " insertAt" option and with children 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
21+
22+ exports[`addStyle should work " insertAt" option and with children 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
23+
324exports[`addStyle should work #2 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.bar { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
425
526exports[`addStyle should work 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
@@ -8,6 +29,8 @@ exports[`addStyle should work with "attrs" option #2 1`] = `"<head><title>Title<
829
930exports[`addStyle should work with " attrs" option 1`] = `"<head><title>Title</title><style foo =\\"bar\\" type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
1031
32+ exports[`addStyle should work with " base" option 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
33+
1134exports[`addStyle should work with " insertAt" option #2 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.bar { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
1235
1336exports[`addStyle should work with " insertAt" option #3 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.bar { color : blue } </style><script src =\\"https://example.com/script.js\\" id =\\"id\\"></script></head><body><h1>Hello world</h1></body>"`;
@@ -20,16 +43,94 @@ exports[`addStyle should work with "insertInto" option #3 1`] = `"<head><title>T
2043
2144exports[`addStyle should work with " insertInto" option 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.bar { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
2245
23- exports[`addStyle should work with " singleton" option 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } .bar { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
24-
25- exports[`addStyle should work with " singleton" option 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.bar { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
26-
2746exports[`addStyle should work with " sourceMap" option 1`] = `
2847" <head><title>Title</title><style type=\\" text/css\\">.foo { color : red }
2948/* # sourceURL=style-1.css */
3049/* # sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLTEuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQXFCLGVBQWUsRUFBRSIsImZpbGUiOiJzdHlsZS0xLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5mb28geyBjb2xvcjogcmVkIH0iXX0= */ </style></head><body><h1>Hello world</h1></body>"
3150`;
3251
52+ exports[`addStyle should work with " transform" option #2 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : yellow } </style></head><body><h1>Hello world</h1></body>"`;
53+
54+ exports[`addStyle should work with " transform" option #3 1`] = `"<head><title>Title</title></head><body><h1>Hello world</h1></body>"`;
55+
56+ exports[`addStyle should work with " transform" option 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : yellow } </style></head><body><h1>Hello world</h1></body>"`;
57+
3358exports[`addStyle should work with media 1`] = `"<head><title>Title</title><style type =\\"text/css\\" media =\\"screen and (min-width:320px)\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
3459
3560exports[`addStyle should work with nonce 1`] = `"<head><title>Title</title><style type =\\"text/css\\" nonce =\\"none\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
61+
62+ exports[`addStyle should work with same module id in list 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.foo { color : green } </style></head><body><h1>Hello world</h1></body>"`;
63+
64+ exports[`addStyle should work with same module id in list 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : black } </style><style type =\\"text/css\\">.foo { color : yellow } </style></head><body><h1>Hello world</h1></body>"`;
65+
66+ exports[`addStyle should work with updates #2 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
67+
68+ exports[`addStyle should work with updates #2 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : blue } </style><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
69+
70+ exports[`addStyle should work with updates #3 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
71+
72+ exports[`addStyle should work with updates #3 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
73+
74+ exports[`addStyle should work with updates #5 1`] = `"<head><title>Title</title><style type =\\"text/css\\" media =\\"screen and (min-width:320px\\">.foo { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
75+
76+ exports[`addStyle should work with updates #5 2`] = `"<head><title>Title</title><style type =\\"text/css\\" media =\\"screen and (min-width:320px\\">.foo { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
77+
78+ exports[`addStyle should work with updates #6 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } .foo { color : yellow } </style></head><body><h1>Hello world</h1></body>"`;
79+
80+ exports[`addStyle should work with updates #6 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : blue } .foo { color : yellow } </style></head><body><h1>Hello world</h1></body>"`;
81+
82+ exports[`addStyle should work with updates #7 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.foo { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
83+
84+ exports[`addStyle should work with updates #7 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : green } </style><style type =\\"text/css\\">.foo { color : black } </style></head><body><h1>Hello world</h1></body>"`;
85+
86+ exports[`addStyle should work with updates #8 1`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div id =\\"id\\"><style type =\\"text/css\\">.foo { color : red } </style></div></body>"`;
87+
88+ exports[`addStyle should work with updates #8 2`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div id =\\"id\\"></div></body>"`;
89+
90+ exports[`addStyle should work with updates #9 1`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div id =\\"id\\"><style type =\\"text/css\\">.foo { color : blue } </style><style type =\\"text/css\\">.foo { color : yellow } </style></div></body>"`;
91+
92+ exports[`addStyle should work with updates #9 2`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div id =\\"id\\"><style type =\\"text/css\\">.foo { color : black } </style></div></body>"`;
93+
94+ exports[`addStyle should work with updates #9 3`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div id =\\"id\\"></div></body>"`;
95+
96+ exports[`addStyle should work with updates #10 1`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div><div id =\\"custom\\"><style type =\\"text/css\\">.foo { color : red } </style></div></div></body>"`;
97+
98+ exports[`addStyle should work with updates #10 2`] = `"<head><title>Title</title></head><body><h1>Hello world</h1><div></div></body>"`;
99+
100+ exports[`addStyle should work with updates #11 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
101+
102+ exports[`addStyle should work with updates #11 2`] = `"<head><title>Title</title></head><body><h1>Hello world</h1></body>"`;
103+
104+ exports[`addStyle should work with updates #12 1`] = `
105+ " <head><title>Title</title><style type=\\" text/css\\">.foo { color : red }
106+ /* # sourceURL=style-40.css */
107+ /* # sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLTQwLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFxQixlQUFlLEVBQUUiLCJmaWxlIjoic3R5bGUtNDAuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvbyB7IGNvbG9yOiByZWQgfSJdfQ== */ </style></head><body><h1>Hello world</h1></body>"
108+ `;
109+
110+ exports[`addStyle should work with updates #12 2`] = `
111+ " <head><title>Title</title><style type=\\" text/css\\">.foo { color : black }
112+ /* # sourceURL=style-40.css */
113+ /* # sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLTQwLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQkJCQixjQUFxQixlQUFlLEVBQUUiLCJmaWxlIjoic3R5bGUtNDAuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvbyB7IGNvbG9yOiBibGFjayB9Il19 */ </style></head><body><h1>Hello world</h1></body>"
114+ `;
115+
116+ exports[`addStyle should work with updates #13 1`] = `"<head><title>Title</title><style type =\\"text/css\\" media =\\"screen and (min-width:320px)\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
117+
118+ exports[`addStyle should work with updates #13 2`] = `"<head><title>Title</title><style type =\\"text/css\\" media =\\"screen and (min-width:640px)\\">.foo { color : black } </style></head><body><h1>Hello world</h1></body>"`;
119+
120+ exports[`addStyle should work with updates #14 1`] = `
121+ " <head><title>Title</title><style type=\\" text/css\\">.foo { color : red }
122+ /* # sourceURL=style-42.css */
123+ /* # sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLTQyLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFxQixlQUFlLEVBQUUiLCJmaWxlIjoic3R5bGUtNDIuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvbyB7IGNvbG9yOiByZWQgfSJdfQ== */ </style><style type =\\"text/css\\">.bar { color : yellow }
124+ /* # sourceURL=style-43.css */
125+ /* # sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLTQzLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFxQixlQUFlLEVBQUUiLCJmaWxlIjoic3R5bGUtNDMuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZvbyB7IGNvbG9yOiByZWQgfSJdfQ== */ </style></head><body><h1>Hello world</h1></body>"
126+ `;
127+
128+ exports[`addStyle should work with updates #14 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : black } </style><style type =\\"text/css\\">.bar { color : gray } </style></head><body><h1>Hello world</h1></body>"`;
129+
130+ exports[`addStyle should work with updates #15 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
131+
132+ exports[`addStyle should work with updates #15 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : black } </style><style type =\\"text/css\\">.foo { color : red } </style><style type =\\"text/css\\">.foo { color : yellow } </style></head><body><h1>Hello world</h1></body>"`;
133+
134+ exports[`addStyle should work with updates 1`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : red } </style></head><body><h1>Hello world</h1></body>"`;
135+
136+ exports[`addStyle should work with updates 2`] = `"<head><title>Title</title><style type =\\"text/css\\">.foo { color : blue } </style></head><body><h1>Hello world</h1></body>"`;
0 commit comments