@@ -101,10 +101,10 @@ describe(`web worker CSS Language tests`, async function () {
101101 * important: none
102102 */
103103
104- const CSS_MODES = [ "CSS" ] ;
104+ const CSS_MODES = [ "CSS" , "LESS" , "SCSS" ] ;
105105 for ( let css of CSS_MODES ) {
106- it ( " should validate css unknownVendorSpecificProperties" , async function ( ) {
107- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
106+ it ( ` should validate ${ css } unknownVendorSpecificProperties` , async function ( ) {
107+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
108108 messageFromWorker = null ;
109109 const text = `div {
110110 -microsoft-border-radius: 5px;
@@ -119,8 +119,8 @@ describe(`web worker CSS Language tests`, async function () {
119119 expect ( symbols ) . to . deep . equal ( cssValidationData [ "unknownVendorSpecificProperties" ] ) ;
120120 } ) ;
121121
122- it ( " should validate css fontFaceProperties" , async function ( ) {
123- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
122+ it ( ` should validate ${ css } fontFaceProperties` , async function ( ) {
123+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
124124 messageFromWorker = null ;
125125 const text = `@font-face {
126126 font-family: 'MyFont';
@@ -135,8 +135,8 @@ describe(`web worker CSS Language tests`, async function () {
135135 expect ( symbols ) . to . deep . equal ( cssValidationData [ "fontFaceProperties" ] ) ;
136136 } ) ;
137137
138- it ( " should validate css fontFaceProperties by default" , async function ( ) {
139- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
138+ it ( ` should validate ${ css } fontFaceProperties by default` , async function ( ) {
139+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
140140 messageFromWorker = null ;
141141 const text = `@font-face {
142142 font-family: 'MyFont';
@@ -148,7 +148,7 @@ describe(`web worker CSS Language tests`, async function () {
148148 expect ( symbols ) . to . deep . equal ( cssValidationData [ "fontFaceProperties" ] ) ;
149149 } ) ;
150150
151- it ( " should not validate css important by default" , async function ( ) {
151+ it ( ` should not validate ${ css } important by default` , async function ( ) {
152152 messageFromWorker = null ;
153153 const text = `.element {
154154 width: 0 !important;
@@ -161,8 +161,8 @@ describe(`web worker CSS Language tests`, async function () {
161161 expect ( symbols ) . to . deep . equal ( [ ] ) ;
162162 } ) ;
163163
164- it ( " should validate css propertyIgnoredDueToDisplay" , async function ( ) {
165- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
164+ it ( ` should validate ${ css } propertyIgnoredDueToDisplay` , async function ( ) {
165+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
166166 messageFromWorker = null ;
167167 const text = `.element {
168168 display: inline-block;
@@ -178,8 +178,8 @@ describe(`web worker CSS Language tests`, async function () {
178178 expect ( symbols ) . to . deep . equal ( cssValidationData [ "propertyIgnoredDueToDisplay" ] ) ;
179179 } ) ;
180180
181- it ( " should validate css propertyIgnoredDueToDisplay by default" , async function ( ) {
182- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
181+ it ( ` should validate ${ css } propertyIgnoredDueToDisplay by default` , async function ( ) {
182+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
183183 messageFromWorker = null ;
184184 const text = `.element {
185185 display: inline-block;
@@ -192,8 +192,8 @@ describe(`web worker CSS Language tests`, async function () {
192192 expect ( symbols ) . to . deep . equal ( cssValidationData [ "propertyIgnoredDueToDisplay" ] ) ;
193193 } ) ;
194194
195- it ( " should validate css ieHack" , async function ( ) {
196- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
195+ it ( ` should validate ${ css } ieHack` , async function ( ) {
196+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
197197 messageFromWorker = null ;
198198 const text = `.myClass {
199199 color: blue; /* For modern browsers */
@@ -209,7 +209,7 @@ describe(`web worker CSS Language tests`, async function () {
209209 expect ( symbols ) . to . deep . equal ( cssValidationData [ "ieHack" ] ) ;
210210 } ) ;
211211
212- it ( " should validate css ieHack by default" , async function ( ) {
212+ it ( ` should validate ${ css } ieHack by default` , async function ( ) {
213213 messageFromWorker = null ;
214214 const text = `.myClass {
215215 color: blue; /* For modern browsers */
@@ -222,8 +222,8 @@ describe(`web worker CSS Language tests`, async function () {
222222 expect ( symbols ) . to . deep . equal ( [ ] ) ;
223223 } ) ;
224224
225- it ( " should validate css unknownProperties" , async function ( ) {
226- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
225+ it ( ` should validate ${ css } unknownProperties` , async function ( ) {
226+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
227227 messageFromWorker = null ;
228228 const text = `.box {
229229 doesntExist: 300px;
@@ -238,8 +238,8 @@ describe(`web worker CSS Language tests`, async function () {
238238 expect ( symbols ) . to . deep . equal ( cssValidationData [ "unknownProperties" ] ) ;
239239 } ) ;
240240
241- it ( " should validate css unknownProperties by default" , async function ( ) {
242- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
241+ it ( ` should validate ${ css } unknownProperties by default` , async function ( ) {
242+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
243243 messageFromWorker = null ;
244244 const text = `.box {
245245 doesntExist: 300px;
@@ -251,8 +251,8 @@ describe(`web worker CSS Language tests`, async function () {
251251 expect ( symbols ) . to . deep . equal ( cssValidationData [ "unknownProperties" ] ) ;
252252 } ) ;
253253
254- it ( " should validate css boxModel" , async function ( ) {
255- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
254+ it ( ` should validate ${ css } boxModel` , async function ( ) {
255+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
256256 messageFromWorker = null ;
257257 const text = `.box {
258258 width: 300px;
@@ -269,7 +269,7 @@ describe(`web worker CSS Language tests`, async function () {
269269 expect ( symbols ) . to . deep . equal ( cssValidationData [ "boxModel" ] ) ;
270270 } ) ;
271271
272- it ( " should not validate css boxModel by default" , async function ( ) {
272+ it ( ` should not validate ${ css } boxModel by default` , async function ( ) {
273273 messageFromWorker = null ;
274274 const text = `.box {
275275 width: 300px;
@@ -283,8 +283,8 @@ describe(`web worker CSS Language tests`, async function () {
283283 expect ( symbols ) . to . deep . equal ( [ ] ) ;
284284 } ) ;
285285
286- it ( " should validate css zeroUnits" , async function ( ) {
287- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
286+ it ( ` should validate ${ css } zeroUnits` , async function ( ) {
287+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
288288 messageFromWorker = null ;
289289 const text = `.box { width: 0px;}` ;
290290 worker . postMessage ( {
@@ -297,7 +297,7 @@ describe(`web worker CSS Language tests`, async function () {
297297 expect ( symbols ) . to . deep . equal ( cssValidationData [ "zeroUnits" ] ) ;
298298 } ) ;
299299
300- it ( " should not validate css zeroUnits by default" , async function ( ) {
300+ it ( ` should not validate ${ css } zeroUnits by default` , async function ( ) {
301301 messageFromWorker = null ;
302302 const text = `.box { width: 0px;}` ;
303303 worker . postMessage ( { command : `validateCSS` , text, cssMode : css , filePath : `file:///c.${ css } ` } ) ;
@@ -306,8 +306,8 @@ describe(`web worker CSS Language tests`, async function () {
306306 expect ( symbols ) . to . deep . equal ( [ ] ) ;
307307 } ) ;
308308
309- it ( " should validate css duplicateProperties" , async function ( ) {
310- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
309+ it ( ` should validate ${ css } duplicateProperties` , async function ( ) {
310+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
311311 messageFromWorker = null ;
312312 const text = `.box { color: red; color: blue; }` ;
313313 worker . postMessage ( {
@@ -320,7 +320,7 @@ describe(`web worker CSS Language tests`, async function () {
320320 expect ( symbols ) . to . deep . equal ( cssValidationData [ "duplicateProperties" ] ) ;
321321 } ) ;
322322
323- it ( " should not validate css duplicateProperties by default" , async function ( ) {
323+ it ( ` should not validate ${ css } duplicateProperties by default` , async function ( ) {
324324 messageFromWorker = null ;
325325 const text = `.box { color: red; color: blue; }` ;
326326 worker . postMessage ( {
@@ -330,8 +330,8 @@ describe(`web worker CSS Language tests`, async function () {
330330 expect ( symbols ) . to . deep . equal ( [ ] ) ;
331331 } ) ;
332332
333- it ( " should validate css importStatement" , async function ( ) {
334- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
333+ it ( ` should validate ${ css } importStatement` , async function ( ) {
334+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
335335 messageFromWorker = null ;
336336 const text = `@import "a.css"` ;
337337 worker . postMessage ( { command : `validateCSS` , text, cssMode : css , filePath : `file:///c.${ css } ` , lintSettings : {
@@ -342,7 +342,7 @@ describe(`web worker CSS Language tests`, async function () {
342342 expect ( symbols ) . to . deep . equal ( cssValidationData [ "importStatement" ] ) ;
343343 } ) ;
344344
345- it ( " should not validate css importStatement by default" , async function ( ) {
345+ it ( ` should not validate ${ css } importStatement by default` , async function ( ) {
346346 messageFromWorker = null ;
347347 const text = `@import "a.css"` ;
348348 worker . postMessage ( { command : `validateCSS` , text, cssMode : css , filePath : `file:///c.${ css } ` } ) ;
@@ -351,8 +351,8 @@ describe(`web worker CSS Language tests`, async function () {
351351 expect ( symbols ) . to . deep . equal ( [ ] ) ;
352352 } ) ;
353353
354- it ( " should validate css emptyRules" , async function ( ) {
355- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
354+ it ( ` should validate ${ css } emptyRules` , async function ( ) {
355+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
356356 messageFromWorker = null ;
357357 const text = `.box {}` ;
358358 worker . postMessage ( { command : `validateCSS` , text, cssMode : css , filePath : `file:///c.${ css } ` , lintSettings : {
@@ -362,8 +362,8 @@ describe(`web worker CSS Language tests`, async function () {
362362 const symbols = output . diag ;
363363 expect ( symbols ) . to . deep . equal ( cssValidationData [ "emptyRules" ] ) ;
364364 } ) ;
365- it ( " should validate css emptyRules by default" , async function ( ) {
366- const cssValidationData = await ( await fetch ( " test-files/cssValidationData .json" ) ) . json ( ) ;
365+ it ( ` should validate ${ css } emptyRules by default` , async function ( ) {
366+ const cssValidationData = await ( await fetch ( ` test-files/${ css } ValidationData .json` ) ) . json ( ) ;
367367 messageFromWorker = null ;
368368 const text = `.box {}` ;
369369 worker . postMessage ( { command : `validateCSS` , text, cssMode : css , filePath : `file:///c.${ css } ` } ) ;
@@ -375,7 +375,7 @@ describe(`web worker CSS Language tests`, async function () {
375375 }
376376
377377 it ( "should validate less emptyRules by default" , async function ( ) {
378- const cssValidationData = await ( await fetch ( "test-files/cssValidationData .json" ) ) . json ( ) ;
378+ const cssValidationData = await ( await fetch ( "test-files/CSSValidationData .json" ) ) . json ( ) ;
379379 messageFromWorker = null ;
380380 const text = `// less supports comments\n.box {}` ;
381381 worker . postMessage ( { command : `validateCSS` , text, cssMode : "LESS" , filePath : "file:///c.less" } ) ;
@@ -385,7 +385,7 @@ describe(`web worker CSS Language tests`, async function () {
385385 } ) ;
386386
387387 it ( "should validate scss emptyRules by default" , async function ( ) {
388- const cssValidationData = await ( await fetch ( "test-files/cssValidationData .json" ) ) . json ( ) ;
388+ const cssValidationData = await ( await fetch ( "test-files/CSSValidationData .json" ) ) . json ( ) ;
389389 messageFromWorker = null ;
390390 const text = `// less supports comments\n.box {}` ;
391391 worker . postMessage ( { command : `validateCSS` , text, cssMode : "SCSS" , filePath : "file:///c.scss" } ) ;
0 commit comments