From 4e226bba43768935ef81124b8ba1245d7b0a4ada Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Nikoli=C4=87?= Date: Mon, 13 Sep 2021 09:05:03 +0200 Subject: [PATCH] Add additional tests --- src/language-css/printer-postcss.js | 1 - tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap | 8 ++++++++ tests/format/scss/quotes/quotes.scss | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/language-css/printer-postcss.js b/src/language-css/printer-postcss.js index 9accdd4e7087..e2d90df32e07 100644 --- a/src/language-css/printer-postcss.js +++ b/src/language-css/printer-postcss.js @@ -555,7 +555,6 @@ function genericPrint(path, options, print) { insideAtRuleNode(path, "forward") && iNode.type === "value-word" && iNode.value && - iNode.value.endsWith("-") && iPrevNode.type === "value-word" && iPrevNode.value && iPrevNode.value === "as" && diff --git a/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap index 4d368ad98852..06419858dada 100644 --- a/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap +++ b/tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap @@ -29,6 +29,8 @@ singleQuote: true @forward "library" as btn-*; +@forward "library" as btn*; + =====================================output===================================== @use 'library'; @@ -49,6 +51,8 @@ singleQuote: true @forward 'library' as btn-*; +@forward 'library' as btn*; + ================================================================================ `; @@ -80,6 +84,8 @@ printWidth: 80 @forward "library" as btn-*; +@forward "library" as btn*; + =====================================output===================================== @use "library"; @@ -100,5 +106,7 @@ printWidth: 80 @forward "library" as btn-*; +@forward "library" as btn*; + ================================================================================ `; diff --git a/tests/format/scss/quotes/quotes.scss b/tests/format/scss/quotes/quotes.scss index 332074a453a5..20607380fbad 100644 --- a/tests/format/scss/quotes/quotes.scss +++ b/tests/format/scss/quotes/quotes.scss @@ -19,3 +19,5 @@ @forward "library" hide gradient; @forward "library" as btn-*; + +@forward "library" as btn*;