diff --git a/src/utils.js b/src/utils.js index 2700f200..499d70f0 100644 --- a/src/utils.js +++ b/src/utils.js @@ -153,9 +153,7 @@ async function getSassOptions( : content; if (!options.logger) { - // TODO set me to `true` by default in the next major release - const needEmitWarning = loaderOptions.warnRuleAsWarning === true; - + const needEmitWarning = loaderOptions.warnRuleAsWarning !== false; const logger = loaderContext.getLogger("sass-loader"); const formatSpan = (span) => `${span.url || "-"}:${span.start.line}:${span.start.column}: `; diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index 2c583500..88d6aeaf 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -2809,20 +2809,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { @@ -2841,20 +2837,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "a { @@ -2873,20 +2865,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "a { @@ -2905,20 +2893,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "a { @@ -2937,20 +2921,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "a { @@ -2969,20 +2949,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "a { @@ -3001,20 +2977,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should use webpack logger ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "a { @@ -3033,20 +3005,16 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should use webpack logger ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should use webpack logger ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; exports[`loader should watch firstly in the "includePaths" values ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` ".bar { @@ -5032,13 +5000,33 @@ exports[`loader should work and output deprecation message (dart-sass): errors 3 exports[`loader should work and output deprecation message (dart-sass): errors 4`] = `Array []`; -exports[`loader should work and output deprecation message (dart-sass): warnings 1`] = `Array []`; +exports[`loader should work and output deprecation message (dart-sass): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; -exports[`loader should work and output deprecation message (dart-sass): warnings 2`] = `Array []`; +exports[`loader should work and output deprecation message (dart-sass): warnings 2`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; -exports[`loader should work and output deprecation message (dart-sass): warnings 3`] = `Array []`; +exports[`loader should work and output deprecation message (dart-sass): warnings 3`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; -exports[`loader should work and output deprecation message (dart-sass): warnings 4`] = `Array []`; +exports[`loader should work and output deprecation message (dart-sass): warnings 4`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; exports[`loader should work and output deprecation message (sass-embedded): css 1`] = ` "a:hover { @@ -5072,13 +5060,33 @@ exports[`loader should work and output deprecation message (sass-embedded): erro exports[`loader should work and output deprecation message (sass-embedded): errors 4`] = `Array []`; -exports[`loader should work and output deprecation message (sass-embedded): warnings 1`] = `Array []`; +exports[`loader should work and output deprecation message (sass-embedded): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; -exports[`loader should work and output deprecation message (sass-embedded): warnings 2`] = `Array []`; +exports[`loader should work and output deprecation message (sass-embedded): warnings 2`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; -exports[`loader should work and output deprecation message (sass-embedded): warnings 3`] = `Array []`; +exports[`loader should work and output deprecation message (sass-embedded): warnings 3`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; -exports[`loader should work and output deprecation message (sass-embedded): warnings 4`] = `Array []`; +exports[`loader should work and output deprecation message (sass-embedded): warnings 4`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation $saturation: Passing a number without unit % (0) is deprecated.", +] +`; exports[`loader should work and output the "compressed" outputStyle when "mode" is production ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = `"@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:#ff0}.foo:before{content:\\"\\"}.bar:before{content:\\"∑\\"}"`; @@ -477705,9 +477713,31 @@ exports[`loader should work with the "material-components-web" package ('dart-sa exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'sass' syntax): errors 2`] = `Array []`; -exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; -exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'sass' syntax): warnings 2`] = `Array []`; +exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'sass' syntax): warnings 2`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` ".test .mdc-touch-target-wrapper { @@ -478493,9 +478523,31 @@ exports[`loader should work with the "material-components-web" package ('dart-sa exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'scss' syntax): errors 2`] = `Array []`; -exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; -exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'scss' syntax): warnings 2`] = `Array []`; +exports[`loader should work with the "material-components-web" package ('dart-sass', 'legacy' API, 'scss' syntax): warnings 2`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` ".test .mdc-touch-target-wrapper { @@ -479281,9 +479333,31 @@ exports[`loader should work with the "material-components-web" package without t exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'sass' syntax): errors 2`] = `Array []`; -exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; -exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'sass' syntax): warnings 2`] = `Array []`; +exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'sass' syntax): warnings 2`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` ".test .mdc-touch-target-wrapper { @@ -480069,9 +480143,31 @@ exports[`loader should work with the "material-components-web" package without t exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'scss' syntax): errors 2`] = `Array []`; -exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; -exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'scss' syntax): warnings 2`] = `Array []`; +exports[`loader should work with the "material-components-web" package without the "includePaths" option ('dart-sass', 'legacy' API, 'scss' syntax): warnings 2`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", + "ModuleWarning: Module Warning (from ../src/cjs.js): +Deprecation Using / for division outside of calc() is deprecated and will be removed in Dart Sass 2.0.0.", +] +`; exports[`loader should work with the 'resolve.byDependecy.sass' option ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` ".a { diff --git a/test/__snapshots__/warnRuleAsWarning.test.js.snap b/test/__snapshots__/warnRuleAsWarning.test.js.snap index 2046be06..d9594668 100644 --- a/test/__snapshots__/warnRuleAsWarning.test.js.snap +++ b/test/__snapshots__/warnRuleAsWarning.test.js.snap @@ -1,14 +1,14 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -17,30 +17,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -49,30 +45,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -81,30 +73,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -113,54 +101,50 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; } " `; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): logs 1`] = `Array []`; +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): logs 1`] = `Array []`; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; } " `; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): logs 1`] = `Array []`; +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): logs 1`] = `Array []`; -exports[`loader should not emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -169,30 +153,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -201,30 +181,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -233,30 +209,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -265,30 +237,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning by default ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -297,30 +265,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -329,30 +293,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -361,30 +321,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -393,54 +349,50 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; } " `; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): logs 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): logs 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; } " `; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): logs 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): logs 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -449,30 +401,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -481,30 +429,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -513,30 +457,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/sass/logging.sass 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): logs 1`] = ` +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -545,30 +485,26 @@ Array [ ], "type": "debug", }, - Object { - "args": Array [ - "My warning message - -test/scss/logging.scss 2:1 root stylesheet -", - ], - "type": "warn", - }, ], ] `; -exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = ` +Array [ + "ModuleWarning: Module Warning (from ../src/cjs.js): +My warning message", +] +`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -577,26 +513,30 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/sass/logging.sass 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -605,26 +545,30 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/scss/logging.scss 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -633,26 +577,30 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/sass/logging.sass 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -661,50 +609,54 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/scss/logging.scss 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('dart-sass', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; } " `; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): logs 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): logs 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; } " `; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): logs 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): logs 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('node-sass', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -713,26 +665,30 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/sass/logging.sass 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -741,26 +697,30 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/scss/logging.scss 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'legacy' API, 'scss' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): logs 1`] = ` Array [ Array [ Object { @@ -769,26 +729,30 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/sass/logging.sass 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'sass' syntax): warnings 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): css 1`] = ` "a { color: red; }" `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): errors 1`] = `Array []`; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): logs 1`] = ` +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): logs 1`] = ` Array [ Array [ Object { @@ -797,13 +761,17 @@ Array [ ], "type": "debug", }, + Object { + "args": Array [ + "My warning message + +test/scss/logging.scss 2:1 root stylesheet +", + ], + "type": "warn", + }, ], ] `; -exports[`loader should not emit warning when 'true' used ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = ` -Array [ - "ModuleWarning: Module Warning (from ../src/cjs.js): -My warning message", -] -`; +exports[`loader should not emit warning when 'false' used ('sass-embedded', 'modern' API, 'scss' syntax): warnings 1`] = `Array []`; diff --git a/test/warnRuleAsWarning.test.js b/test/warnRuleAsWarning.test.js index c12d6fcd..f16efc13 100644 --- a/test/warnRuleAsWarning.test.js +++ b/test/warnRuleAsWarning.test.js @@ -39,7 +39,7 @@ describe("loader", () => { const { name: implementationName, api, implementation } = item; syntaxStyles.forEach((syntax) => { - it(`should not emit warning by default ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { + it(`should emit warning by default ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { const testId = getTestId("logging", syntax); const options = { implementation, @@ -112,7 +112,7 @@ describe("loader", () => { expect(logs).toMatchSnapshot("logs"); }); - it(`should not emit warning when 'true' used ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { + it(`should emit warning when 'true' used ('${implementationName}', '${api}' API, '${syntax}' syntax)`, async () => { const testId = getTestId("logging", syntax); const options = { implementation,