@@ -45,14 +45,23 @@ describe(`web worker CSS Language tests`, function () {
4545 expect ( output ) . to . be . not . null ;
4646 } ) ;
4747
48- it ( `Should getAllSymbols get all css symbols ` , async function ( ) {
48+ it ( `Should getAllSymbols get all css selectors ` , async function ( ) {
4949 messageFromWorker = null ;
50- const text = await ( await fetch ( "test-files/a.css" ) ) . text ( ) ;
50+ const text = await ( await fetch ( "test-files/css-tests/ a.css" ) ) . text ( ) ;
5151 worker . postMessage ( { command : `getAllSymbols` , text, cssMode : "CSS" , filePath : "file:///a.css" } ) ;
5252 let output = await waitForWorkerMessage ( `getAllSymbols` , 1000 ) ;
5353 const symbols = output . symbols ;
5454 expect ( symbols . length ) . to . eql ( 29 ) ;
5555 expect ( symbols . includes ( ".testClass" ) ) . to . be . true ;
5656 expect ( symbols . includes ( "@keyframes shooting" ) ) . to . be . true ;
5757 } ) ;
58+
59+ it ( `Should getAllSymbols get all less selectors` , async function ( ) {
60+ messageFromWorker = null ;
61+ const text = await ( await fetch ( "test-files/css-tests/b.less" ) ) . text ( ) ;
62+ worker . postMessage ( { command : `getAllSymbols` , text, cssMode : "LESS" , filePath : "file:///b.less" } ) ;
63+ let output = await waitForWorkerMessage ( `getAllSymbols` , 1000 ) ;
64+ const symbols = output . symbols ;
65+ expect ( symbols ) . to . deep . equal ( [ "#header" , ".navigation" , ".logo" , "& .phcode" ] ) ;
66+ } ) ;
5867} ) ;
0 commit comments