From 910ee5fe7bf28b8478abece6c49f5a4e6dc6576a Mon Sep 17 00:00:00 2001 From: "alexander.akait" Date: Fri, 22 Dec 2023 17:50:26 +0300 Subject: [PATCH] test: drop `fibers` test --- package-lock.json | 13 +- package.json | 1 - .../sassOptions-option.test.js.snap | 1590 ++++++----------- test/additionalData-option.test.js | 18 - test/implementation-option.test.js | 18 - test/loader.test.js | 17 - test/sassOptions-option.test.js | 84 - test/sourceMap-options.test.js | 17 - test/validate-options.test.js | 19 - test/warnRuleAsWarning.test.js | 18 - test/webpackImporter-options.test.js | 17 - 11 files changed, 509 insertions(+), 1303 deletions(-) diff --git a/package-lock.json b/package-lock.json index 74a632a5..9775b51e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,6 @@ "eslint": "^8.46.0", "eslint-config-prettier": "^8.9.0", "eslint-plugin-import": "^2.28.0", - "fibers": "^5.0.3", "file-loader": "^6.2.0", "foundation-sites": "^6.7.5", "husky": "^8.0.3", @@ -7370,7 +7369,8 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true, + "optional": true, + "peer": true, "bin": { "detect-libc": "bin/detect-libc.js" }, @@ -8272,8 +8272,9 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/fibers/-/fibers-5.0.3.tgz", "integrity": "sha512-/qYTSoZydQkM21qZpGLDLuCq8c+B8KhuCQ1kLPvnRNhxhVbvrpmH9l2+Lblf5neDuEsY4bfT7LeO553TXQDvJw==", - "dev": true, "hasInstallScript": true, + "optional": true, + "peer": true, "dependencies": { "detect-libc": "^1.0.3" }, @@ -22422,7 +22423,8 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "dev": true + "optional": true, + "peer": true }, "detect-newline": { "version": "3.1.0", @@ -23116,7 +23118,8 @@ "version": "5.0.3", "resolved": "https://registry.npmjs.org/fibers/-/fibers-5.0.3.tgz", "integrity": "sha512-/qYTSoZydQkM21qZpGLDLuCq8c+B8KhuCQ1kLPvnRNhxhVbvrpmH9l2+Lblf5neDuEsY4bfT7LeO553TXQDvJw==", - "dev": true, + "optional": true, + "peer": true, "requires": { "detect-libc": "^1.0.3" } diff --git a/package.json b/package.json index 4f292be3..666dee60 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,6 @@ "eslint": "^8.46.0", "eslint-config-prettier": "^8.9.0", "eslint-plugin-import": "^2.28.0", - "fibers": "^5.0.3", "file-loader": "^6.2.0", "foundation-sites": "^6.7.5", "husky": "^8.0.3", diff --git a/test/__snapshots__/sassOptions-option.test.js.snap b/test/__snapshots__/sassOptions-option.test.js.snap index 2b10048f..1a036af9 100644 --- a/test/__snapshots__/sassOptions-option.test.js.snap +++ b/test/__snapshots__/sassOptions-option.test.js.snap @@ -1872,7 +1872,109 @@ exports[`sassOptions option should use "compressed" output style in the "product exports[`sassOptions option should use "compressed" output style in the "production" mode ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.message, .warning, .error, .success { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} + +.success { + border-color: green; +} + +.error { + border-color: red; +} + +.warning { + border-color: yellow; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; + +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; + +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; + +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -1928,11 +2030,11 @@ nav a { }" `; -exports[`sassOptions option should use the "fibers" package if it is possible ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -1970,11 +2072,11 @@ nav a { }" `; -exports[`sassOptions option should use the "fibers" package if it is possible ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { @@ -2022,11 +2124,11 @@ nav a { " `; -exports[`sassOptions option should use the "fibers" package if it is possible ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { @@ -2060,11 +2162,11 @@ nav a { " `; -exports[`sassOptions option should use the "fibers" package if it is possible ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2120,11 +2222,11 @@ nav a { }" `; -exports[`sassOptions option should use the "fibers" package if it is possible ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2162,11 +2264,11 @@ nav a { }" `; -exports[`sassOptions option should use the "fibers" package if it is possible ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should use the "fibers" package if it is possible ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2222,11 +2324,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2264,11 +2366,113 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.message, .warning, .error, .success { + border: 1px solid #ccc; + padding: 10px; + color: #333; +} + +.success { + border-color: green; +} + +.error { + border-color: red; +} + +.warning { + border-color: yellow; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; + +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; + +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +"@charset "UTF-8"; +@import "./file.css"; +body { + font: 100% Helvetica, sans-serif; + color: #333; +} + +nav ul { + margin: 0; + padding: 0; + list-style: none; +} +nav li { + display: inline-block; +} +nav a { + display: block; + padding: 6px 12px; + text-decoration: none; +} + +.box { + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; +} + +.foo:before { + content: "\\e0c6"; +} + +.bar:before { + content: "∑"; +}" +`; + +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; + +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; + +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2324,11 +2528,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2366,101 +2570,101 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { - font: 100% Helvetica, sans-serif; - color: #333; } + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; } - + margin: 0; + padding: 0; + list-style: none; } + nav li { - display: inline-block; } + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .message, .success, .error, .warning { - border: 1px solid #ccc; - padding: 10px; - color: #333; } + border: 1px solid #ccc; + padding: 10px; + color: #333; } .success { - border-color: green; } + border-color: green; } .error { - border-color: red; } + border-color: red; } .warning { - border-color: yellow; } + border-color: yellow; } .foo:before { - content: ""; } + content: ""; } .bar:before { - content: "∑"; } + content: "∑"; } " `; -exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { - font: 100% Helvetica, sans-serif; - color: #333; } + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; } + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; } + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .foo:before { - content: ""; } + content: ""; } .bar:before { - content: "∑"; } + content: "∑"; } " `; -exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2516,11 +2720,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2558,11 +2762,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2618,11 +2822,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2660,113 +2864,113 @@ nav a { }" `; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option is empty "Object" ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { - font: 100% Helvetica, sans-serif; - color: #333; + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; + border: 1px solid #ccc; + padding: 10px; + color: #333; } .success { - border-color: green; + border-color: green; } .error { - border-color: red; + border-color: red; } .warning { - border-color: yellow; + border-color: yellow; } .foo:before { - content: "\\e0c6"; + content: "\\e0c6"; } .bar:before { - content: "∑"; + content: "∑"; }" `; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { - font: 100% Helvetica, sans-serif; - color: #333; + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .foo:before { - content: "\\e0c6"; + content: "\\e0c6"; } .bar:before { - content: "∑"; + content: "∑"; }" `; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2822,11 +3026,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -2864,101 +3068,101 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { - font: 100% Helvetica, sans-serif; - color: #333; } + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; } + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; } + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .message, .success, .error, .warning { - border: 1px solid #ccc; - padding: 10px; - color: #333; } + border: 1px solid #ccc; + padding: 10px; + color: #333; } .success { - border-color: green; } + border-color: green; } .error { - border-color: red; } + border-color: red; } .warning { - border-color: yellow; } + border-color: yellow; } .foo:before { - content: ""; } + content: ""; } .bar:before { - content: "∑"; } + content: "∑"; } " `; -exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { - font: 100% Helvetica, sans-serif; - color: #333; } + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; } + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; } + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .foo:before { - content: ""; } + content: ""; } .bar:before { - content: "∑"; } + content: "∑"; } " `; -exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3014,11 +3218,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3056,11 +3260,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3116,11 +3320,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3158,113 +3362,113 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { - font: 100% Helvetica, sans-serif; - color: #333; + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; + border: 1px solid #ccc; + padding: 10px; + color: #333; } .success { - border-color: green; + border-color: green; } .error { - border-color: red; + border-color: red; } .warning { - border-color: yellow; + border-color: yellow; } .foo:before { - content: "\\e0c6"; + content: "\\e0c6"; } .bar:before { - content: "∑"; + content: "∑"; }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { - font: 100% Helvetica, sans-serif; - color: #333; + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .foo:before { - content: "\\e0c6"; + content: "\\e0c6"; } .bar:before { - content: "∑"; + content: "∑"; }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3320,11 +3524,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3362,101 +3566,101 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { - font: 100% Helvetica, sans-serif; - color: #333; } + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; } + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; } + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .message, .success, .error, .warning { - border: 1px solid #ccc; - padding: 10px; - color: #333; } + border: 1px solid #ccc; + padding: 10px; + color: #333; } .success { - border-color: green; } + border-color: green; } .error { - border-color: red; } + border-color: red; } .warning { - border-color: yellow; } + border-color: yellow; } .foo:before { - content: ""; } + content: ""; } .bar:before { - content: "∑"; } + content: "∑"; } " `; -exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import url(./file.css); body { - font: 100% Helvetica, sans-serif; - color: #333; } + font: 100% Helvetica, sans-serif; + color: #333; } nav ul { - margin: 0; - padding: 0; - list-style: none; } + margin: 0; + padding: 0; + list-style: none; } nav li { - display: inline-block; } + display: inline-block; } nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } + display: block; + padding: 6px 12px; + text-decoration: none; } .box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + -ms-border-radius: 10px; + border-radius: 10px; } .foo:before { - content: ""; } + content: ""; } .bar:before { - content: "∑"; } + content: "∑"; } " `; -exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3512,11 +3716,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3554,11 +3758,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3614,11 +3818,11 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "@charset "UTF-8"; @import "./file.css"; body { @@ -3656,817 +3860,25 @@ nav a { }" `; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work when the option like "Function" and never return ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} - -.success { - border-color: green; -} - -.error { - border-color: red; -} - -.warning { - border-color: yellow; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} - -.success { - border-color: green; -} - -.error { - border-color: red; -} - -.warning { - border-color: yellow; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import url(./file.css); -body { - font: 100% Helvetica, sans-serif; - color: #333; } - -nav ul { - margin: 0; - padding: 0; - list-style: none; } - -nav li { - display: inline-block; } - -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } - -.message, .success, .error, .warning { - border: 1px solid #ccc; - padding: 10px; - color: #333; } - -.success { - border-color: green; } - -.error { - border-color: red; } - -.warning { - border-color: yellow; } - -.foo:before { - content: ""; } - -.bar:before { - content: "∑"; } -" -`; - -exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import url(./file.css); -body { - font: 100% Helvetica, sans-serif; - color: #333; } - -nav ul { - margin: 0; - padding: 0; - list-style: none; } - -nav li { - display: inline-block; } - -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } - -.foo:before { - content: ""; } - -.bar:before { - content: "∑"; } -" -`; - -exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} - -.success { - border-color: green; -} - -.error { - border-color: red; -} - -.warning { - border-color: yellow; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} - -.success { - border-color: green; -} - -.error { - border-color: red; -} - -.warning { - border-color: yellow; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work when the option like "Object" ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} - -.success { - border-color: green; -} - -.error { - border-color: red; -} - -.warning { - border-color: yellow; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work with the "fiber" option ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work with the "fiber" option ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import url(./file.css); -body { - font: 100% Helvetica, sans-serif; - color: #333; } - -nav ul { - margin: 0; - padding: 0; - list-style: none; } - -nav li { - display: inline-block; } - -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } - -.message, .success, .error, .warning { - border: 1px solid #ccc; - padding: 10px; - color: #333; } - -.success { - border-color: green; } - -.error { - border-color: red; } - -.warning { - border-color: yellow; } - -.foo:before { - content: ""; } - -.bar:before { - content: "∑"; } -" -`; - -exports[`sassOptions option should work with the "fiber" option ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import url(./file.css); -body { - font: 100% Helvetica, sans-serif; - color: #333; } - -nav ul { - margin: 0; - padding: 0; - list-style: none; } - -nav li { - display: inline-block; } - -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; } - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; } - -.foo:before { - content: ""; } - -.bar:before { - content: "∑"; } -" -`; - -exports[`sassOptions option should work with the "fiber" option ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} - -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} - -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} - -.message, .warning, .error, .success { - border: 1px solid #ccc; - padding: 10px; - color: #333; -} - -.success { - border-color: green; -} - -.error { - border-color: red; -} - -.warning { - border-color: yellow; -} - -.foo:before { - content: "\\e0c6"; -} - -.bar:before { - content: "∑"; -}" -`; - -exports[`sassOptions option should work with the "fiber" option ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `[]`; - -exports[`sassOptions option should work with the "fiber" option ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work with the "fiber" option ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` -"@charset "UTF-8"; -@import "./file.css"; -body { - font: 100% Helvetica, sans-serif; - color: #333; -} +exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -nav ul { - margin: 0; - padding: 0; - list-style: none; -} -nav li { - display: inline-block; -} -nav a { - display: block; - padding: 6px 12px; - text-decoration: none; -} +exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -.box { - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - -ms-border-radius: 10px; - border-radius: 10px; -} +exports[`sassOptions option should work with custom scheme import ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; -.foo:before { - content: "\\e0c6"; -} +exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `[]`; -.bar:before { - content: "∑"; -}" -`; +exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `[]`; -exports[`sassOptions option should work with the "fiber" option ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `[]`; +exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `[]`; -exports[`sassOptions option should work with the "fiber" option ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `[]`; +exports[`sassOptions option should work with custom scheme import ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `[]`; exports[`sassOptions option should work with the "functions" option ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "h2, h3, h4, h5 { diff --git a/test/additionalData-option.test.js b/test/additionalData-option.test.js index 69f6ecbc..1ae63d6a 100644 --- a/test/additionalData-option.test.js +++ b/test/additionalData-option.test.js @@ -1,5 +1,3 @@ -import { isSupportedFibers } from "../src/utils"; - import { compile, getCodeFromBundle, @@ -11,26 +9,10 @@ import { getWarnings, } from "./helpers"; -let Fiber; const implementations = getImplementationsAndAPI(); const syntaxStyles = ["scss", "sass"]; describe("additionalData option", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { const { name: implementationName, api, implementation } = item; diff --git a/test/implementation-option.test.js b/test/implementation-option.test.js index c064f48f..d699a0f1 100644 --- a/test/implementation-option.test.js +++ b/test/implementation-option.test.js @@ -3,8 +3,6 @@ import dartSass from "sass"; // eslint-disable-next-line import/no-namespace import * as sassEmbedded from "sass-embedded"; -import { isSupportedFibers } from "../src/utils"; - import { compile, getCodeFromBundle, @@ -18,25 +16,9 @@ import { jest.setTimeout(30000); -let Fiber; const implementations = [...getImplementationsAndAPI(), "sass_string"]; describe("implementation option", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { let implementationName; let implementation; diff --git a/test/loader.test.js b/test/loader.test.js index 249d42fa..a44d7922 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -3,8 +3,6 @@ import url from "url"; import del from "del"; -import { isSupportedFibers } from "../src/utils"; - import { compile, getCodeFromBundle, @@ -18,25 +16,10 @@ import { jest.setTimeout(60000); -let Fiber; const implementations = getImplementationsAndAPI(); const syntaxStyles = ["scss", "sass"]; describe("loader", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { const { name: implementationName, api, implementation } = item; // TODO fix me https://github.com/webpack-contrib/sass-loader/issues/774 diff --git a/test/sassOptions-option.test.js b/test/sassOptions-option.test.js index 07a65d26..94ef1fa6 100644 --- a/test/sassOptions-option.test.js +++ b/test/sassOptions-option.test.js @@ -4,8 +4,6 @@ import globImporter from "node-sass-glob-importer"; import semver from "semver"; import dartSass from "sass"; -import { isSupportedFibers } from "../src/utils"; - import { compile, customImporter, @@ -21,25 +19,10 @@ import { jest.setTimeout(30000); -let Fiber; const implementations = getImplementationsAndAPI(); const syntaxStyles = ["scss", "sass"]; describe("sassOptions option", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { const { name: implementationName, api, implementation } = item; const isModernAPI = api === "modern"; @@ -453,73 +436,6 @@ describe("sassOptions option", () => { } if (!isModernAPI) { - it(`should work with the "fiber" option ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { - const dartSassSpy = jest.spyOn(dartSass, "render"); - const testId = getTestId("language", syntax); - const options = { - implementation, - api, - sassOptions: {}, - }; - - if ( - implementationName === "dart-sass" && - semver.satisfies(process.version, ">= 10") - ) { - // eslint-disable-next-line global-require - options.sassOptions.fiber = Fiber; - } - - const compiler = getCompiler(testId, { loader: { options } }); - const stats = await compile(compiler); - const codeFromBundle = getCodeFromBundle(stats, compiler); - const codeFromSass = await getCodeFromSass(testId, options); - - if ( - implementationName === "dart-sass" && - semver.satisfies(process.version, ">= 10") && - isSupportedFibers() - ) { - expect(dartSassSpy.mock.calls[0][0]).toHaveProperty("fiber"); - } - - expect(codeFromBundle.css).toBe(codeFromSass.css); - expect(codeFromBundle.css).toMatchSnapshot("css"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - - dartSassSpy.mockRestore(); - }); - - it(`should use the "fibers" package if it is possible ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { - const dartSassSpy = jest.spyOn(dartSass, "render"); - const testId = getTestId("language", syntax); - const options = { - implementation, - api, - sassOptions: {}, - }; - const compiler = getCompiler(testId, { loader: { options } }); - const stats = await compile(compiler); - const codeFromBundle = getCodeFromBundle(stats, compiler); - const codeFromSass = await getCodeFromSass(testId, options); - - if ( - implementationName === "dart-sass" && - semver.satisfies(process.version, ">= 10") && - isSupportedFibers() - ) { - expect(dartSassSpy.mock.calls[0][0]).toHaveProperty("fiber"); - } - - expect(codeFromBundle.css).toBe(codeFromSass.css); - expect(codeFromBundle.css).toMatchSnapshot("css"); - expect(getWarnings(stats)).toMatchSnapshot("warnings"); - expect(getErrors(stats)).toMatchSnapshot("errors"); - - dartSassSpy.mockRestore(); - }); - it(`should don't use the "fibers" package when the "fiber" option is "false" ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { const dartSassSpy = jest.spyOn(dartSass, "render"); const testId = getTestId("language", syntax); diff --git a/test/sourceMap-options.test.js b/test/sourceMap-options.test.js index fb3fd891..468fe160 100644 --- a/test/sourceMap-options.test.js +++ b/test/sourceMap-options.test.js @@ -2,8 +2,6 @@ import fs from "fs"; import path from "path"; import url from "url"; -import { isSupportedFibers } from "../src/utils"; - import { compile, getCodeFromBundle, @@ -14,25 +12,10 @@ import { getWarnings, } from "./helpers"; -let Fiber; const implementations = getImplementationsAndAPI(); const syntaxStyles = ["scss", "sass"]; describe("sourceMap option", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { syntaxStyles.forEach((syntax) => { const { name: implementationName, api, implementation } = item; diff --git a/test/validate-options.test.js b/test/validate-options.test.js index cbb0d9b0..7d87d17c 100644 --- a/test/validate-options.test.js +++ b/test/validate-options.test.js @@ -1,5 +1,3 @@ -import { isSupportedFibers } from "../src/utils"; - import { getCompiler, compile, @@ -7,24 +5,7 @@ import { getImplementationByName, } from "./helpers/index"; -let Fiber; - describe("validate options", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - const tests = { implementation: { success: [ diff --git a/test/warnRuleAsWarning.test.js b/test/warnRuleAsWarning.test.js index f16efc13..4806d543 100644 --- a/test/warnRuleAsWarning.test.js +++ b/test/warnRuleAsWarning.test.js @@ -1,7 +1,5 @@ import url from "url"; -import { isSupportedFibers } from "../src/utils"; - import { compile, getCodeFromBundle, @@ -15,26 +13,10 @@ import { jest.setTimeout(60000); -let Fiber; const implementations = getImplementationsAndAPI(); const syntaxStyles = ["scss", "sass"]; describe("loader", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { const { name: implementationName, api, implementation } = item; diff --git a/test/webpackImporter-options.test.js b/test/webpackImporter-options.test.js index 8e22805b..d3c7395c 100644 --- a/test/webpackImporter-options.test.js +++ b/test/webpackImporter-options.test.js @@ -1,5 +1,3 @@ -import { isSupportedFibers } from "../src/utils"; - import { compile, getCodeFromBundle, @@ -11,25 +9,10 @@ import { getWarnings, } from "./helpers"; -let Fiber; const implementations = getImplementationsAndAPI(); const syntaxStyles = ["scss", "sass"]; describe("webpackImporter option", () => { - beforeAll(async () => { - if (isSupportedFibers()) { - const { default: fibers } = await import("fibers"); - Fiber = fibers; - } - }); - - beforeEach(() => { - if (isSupportedFibers()) { - // The `sass` (`Dart Sass`) package modify the `Function` prototype, but the `jest` lose a prototype - Object.setPrototypeOf(Fiber, Function.prototype); - } - }); - implementations.forEach((item) => { syntaxStyles.forEach((syntax) => { const { name: implementationName, api, implementation } = item;