Skip to content

Commit dd32fad

Browse files
refactor: tests (#389)
1 parent 212525c commit dd32fad

File tree

9 files changed

+681
-203
lines changed

9 files changed

+681
-203
lines changed

src/runtime/addStyleUrl.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ function addAttrs(element, attrs) {
88
}
99

1010
module.exports = function addStyleUrl(url, options) {
11+
/* istanbul ignore if */
1112
if (typeof DEBUG !== 'undefined' && DEBUG) {
1213
if (typeof document !== 'object') {
1314
throw new Error(
@@ -29,7 +30,7 @@ module.exports = function addStyleUrl(url, options) {
2930

3031
addAttrs(link, options.attrs);
3132

32-
const [head] = document.getElementsByTagName('head');
33+
const head = document.getElementsByTagName('head')[0];
3334

3435
head.appendChild(link);
3536

src/runtime/addStyles.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ var getElement = (function() {
5757
// due to cross-origin restrictions
5858
styleTarget = styleTarget.contentDocument.head;
5959
} catch (e) {
60+
// istanbul ignore next
6061
styleTarget = null;
6162
}
6263
}
@@ -73,6 +74,7 @@ var singletonCounter = 0;
7374
var stylesInsertedAtTop = [];
7475

7576
module.exports = function(list, options) {
77+
/* istanbul ignore if */
7678
if (typeof DEBUG !== 'undefined' && DEBUG) {
7779
if (typeof document !== 'object') {
7880
throw new Error(
@@ -112,8 +114,10 @@ module.exports = function(list, options) {
112114
var item = styles[i];
113115
var domStyle = stylesInDom[item.id];
114116

115-
domStyle.refs--;
116-
mayRemove.push(domStyle);
117+
if (domStyle) {
118+
domStyle.refs--;
119+
mayRemove.push(domStyle);
120+
}
117121
}
118122

119123
if (newList) {
@@ -323,6 +327,7 @@ function addStyle(obj, options) {
323327
};
324328
}
325329

330+
/* istanbul ignore next */
326331
var replaceText = (function() {
327332
var textStore = [];
328333

@@ -336,6 +341,8 @@ var replaceText = (function() {
336341
function applyToSingletonTag(style, index, remove, obj) {
337342
var css = remove ? '' : obj.css;
338343

344+
// For old IE
345+
/* istanbul ignore if */
339346
if (style.styleSheet) {
340347
style.styleSheet.cssText = replaceText(index, css);
341348
} else {
@@ -374,6 +381,8 @@ function applyToTag(style, obj) {
374381
' */';
375382
}
376383

384+
// For old IE
385+
/* istanbul ignore if */
377386
if (style.styleSheet) {
378387
style.styleSheet.cssText = css;
379388
} else {

test/basic.test.js renamed to test/loader.test.js

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
/* eslint-env browser */
22
const path = require('path');
33

4+
const loaderUtils = require('loader-utils');
5+
6+
const url = require('../url');
7+
const useable = require('../useable');
8+
49
const utils = require('./utils');
510

611
describe('basic tests', () => {
@@ -619,3 +624,174 @@ describe('basic tests', () => {
619624
});
620625
});
621626
});
627+
628+
describe('url tests', () => {
629+
let getOptions;
630+
let origGetOptions;
631+
632+
beforeEach(() => {
633+
getOptions = jest.fn();
634+
635+
origGetOptions = loaderUtils.getOptions;
636+
// Mock loaderUtils to override options
637+
loaderUtils.getOptions = getOptions;
638+
});
639+
640+
afterEach(() => {
641+
loaderUtils.getOptions = origGetOptions;
642+
});
643+
644+
it('should output HMR code by default', () => {
645+
expect(/(module\.hot)/g.test(url.pitch())).toBe(true);
646+
});
647+
648+
it('should NOT output HMR code when options.hmr is false', () => {
649+
getOptions.mockReturnValue({ hmr: false });
650+
651+
expect(/(module\.hot)/g.test(url.pitch())).toBe(false);
652+
});
653+
654+
it('should output HMR code when options.hmr is true', () => {
655+
getOptions.mockReturnValue({ hmr: true });
656+
657+
expect(/(module\.hot)/g.test(url.pitch())).toBe(true);
658+
});
659+
});
660+
661+
describe('useable tests', () => {
662+
describe('insert into', () => {
663+
const { runCompilerTest } = utils;
664+
665+
let fs;
666+
667+
const requiredCss = '.required { color: blue }';
668+
const requiredCssTwo = '.requiredTwo { color: cyan }';
669+
const localScopedCss = ':local(.className) { background: red; }';
670+
const localComposingCss = `
671+
:local(.composingClass) {
672+
composes: className from './localScoped.css';
673+
color: blue;
674+
}
675+
`;
676+
const requiredStyle = `<style type="text/css">${requiredCss}</style>`;
677+
const existingStyle = `<style id="existing-style">.existing { color: yellow }</style>`;
678+
const checkValue = '<div class="check">check</div>';
679+
const rootDir = `${path.resolve(`${__dirname}/../`)}/`;
680+
const jsdomHtml = [
681+
'<html>',
682+
"<head id='head'>",
683+
existingStyle,
684+
'</head>',
685+
'<body>',
686+
"<div class='target'>",
687+
checkValue,
688+
'</div>',
689+
"<iframe class='iframeTarget'/>",
690+
'</body>',
691+
'</html>',
692+
].join('\n');
693+
const requiredJS = [
694+
"var el = document.createElement('div');",
695+
'el.id = "test-shadow";',
696+
'document.body.appendChild(el)',
697+
"var css = require('./style.css');",
698+
'css.use();',
699+
].join('\n');
700+
701+
const styleLoaderOptions = {};
702+
const cssRule = {};
703+
704+
const defaultCssRule = {
705+
test: /\.css?$/,
706+
use: [
707+
{
708+
loader: 'style-loader/useable',
709+
options: styleLoaderOptions,
710+
},
711+
'css-loader',
712+
],
713+
};
714+
715+
const webpackConfig = {
716+
entry: './main.js',
717+
output: {
718+
filename: 'bundle.js',
719+
},
720+
module: {
721+
rules: [cssRule],
722+
},
723+
};
724+
725+
const setupWebpackConfig = () => {
726+
fs = utils.setup(webpackConfig, jsdomHtml);
727+
728+
// Create a tiny file system. rootDir is used because loaders are referring to absolute paths.
729+
fs.mkdirpSync(rootDir);
730+
fs.writeFileSync(`${rootDir}main.js`, requiredJS);
731+
fs.writeFileSync(`${rootDir}style.css`, requiredCss);
732+
fs.writeFileSync(`${rootDir}styleTwo.css`, requiredCssTwo);
733+
fs.writeFileSync(`${rootDir}localScoped.css`, localScopedCss);
734+
fs.writeFileSync(`${rootDir}localComposing.css`, localComposingCss);
735+
};
736+
737+
beforeEach(() => {
738+
// Reset all style-loader options
739+
for (const member in styleLoaderOptions) {
740+
if (Object.prototype.hasOwnProperty.call(styleLoaderOptions, member)) {
741+
delete styleLoaderOptions[member];
742+
}
743+
}
744+
745+
for (const member in defaultCssRule) {
746+
if (Object.prototype.hasOwnProperty.call(defaultCssRule, member)) {
747+
cssRule[member] = defaultCssRule[member];
748+
}
749+
}
750+
751+
setupWebpackConfig();
752+
});
753+
754+
it('insert into iframe', (done) => {
755+
const selector = 'iframe.iframeTarget';
756+
757+
styleLoaderOptions.insertInto = selector;
758+
759+
runCompilerTest(
760+
requiredStyle,
761+
done,
762+
function test() {
763+
return this.document.querySelector(selector).contentDocument.head
764+
.innerHTML;
765+
},
766+
selector
767+
);
768+
});
769+
});
770+
771+
describe('hmr', () => {
772+
let getOptions;
773+
774+
beforeEach(() => {
775+
getOptions = jest.fn();
776+
777+
// Mock loaderUtils to override options
778+
loaderUtils.getOptions = getOptions;
779+
});
780+
781+
it('should output HMR code by default', () => {
782+
expect(/(module\.hot)/g.test(useable.pitch())).toBe(true);
783+
});
784+
785+
it('should NOT output HMR code when options.hmr is false', () => {
786+
getOptions.mockReturnValue({ hmr: false });
787+
788+
expect(/(module\.hot)/g.test(useable.pitch())).toBe(false);
789+
});
790+
791+
it('should output HMR code when options.hmr is true', () => {
792+
getOptions.mockReturnValue({ hmr: true });
793+
794+
expect(/(module\.hot)/g.test(useable.pitch())).toBe(true);
795+
});
796+
});
797+
});

test/runtime/__snapshots__/addStyle.test.js.snap

Lines changed: 105 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
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+
324
exports[`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
526
exports[`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
930
exports[`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+
1134
exports[`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
1336
exports[`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
2144
exports[`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-
2746
exports[`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+
3358
exports[`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
3560
exports[`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>"`;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`addStyle should work 1`] = `"<head><title>Title</title><link rel=\\"stylesheet\\" type=\\"text/css\\" href=\\"./style-1.css\\"></head><body><h1>Hello world</h1></body>"`;
4+
5+
exports[`addStyle should work with "attrs" option 1`] = `"<head><title>Title</title><link rel=\\"stylesheet\\" type=\\"text/css\\" href=\\"./style-1.css\\" foo=\\"bar\\"></head><body><h1>Hello world</h1></body>"`;

0 commit comments

Comments
 (0)