@@ -20,24 +20,6 @@ describe('target', () => {
2020 expect ( snapshot ) . contain ( '?.' )
2121 } )
2222
23- test ( 'css syntax lowering' , async ( context ) => {
24- const { snapshot } = await testBuild ( {
25- context,
26- files : { 'index.css' : '.foo { & .bar { color: red } }' } ,
27- options : { entry : 'index.css' , target : 'chrome108' } ,
28- } )
29- expect ( snapshot ) . not . contain ( '&' )
30- } )
31-
32- test ( 'unnecessary css syntax lowering' , async ( context ) => {
33- const { snapshot } = await testBuild ( {
34- context,
35- files : { 'index.css' : '.foo { & .bar { color: red } }' } ,
36- options : { entry : 'index.css' , target : [ 'safari18.4' ] } ,
37- } )
38- expect ( snapshot ) . contain ( '&' )
39- } )
40-
4123 test ( 'target: false disables all syntax transformations' , async ( context ) => {
4224 const { snapshot } = await testBuild ( {
4325 context,
@@ -48,13 +30,33 @@ describe('target', () => {
4830 expect ( snapshot ) . contain ( '?.' )
4931 } )
5032
51- test ( 'target: false with CSS preserves modern syntax' , async ( context ) => {
52- const { snapshot } = await testBuild ( {
53- context,
54- files : { 'index.css' : '.foo { & .bar { color: red } }' } ,
55- options : { entry : 'index.css' , target : false } ,
33+ describe . skip ( 'css' , ( ) => {
34+ test ( 'css syntax lowering' , async ( context ) => {
35+ const { snapshot } = await testBuild ( {
36+ context,
37+ files : { 'index.css' : '.foo { & .bar { color: red } }' } ,
38+ options : { entry : 'index.css' , target : 'chrome108' } ,
39+ } )
40+ expect ( snapshot ) . not . contain ( '&' )
41+ } )
42+
43+ test ( 'unnecessary css syntax lowering' , async ( context ) => {
44+ const { snapshot } = await testBuild ( {
45+ context,
46+ files : { 'index.css' : '.foo { & .bar { color: red } }' } ,
47+ options : { entry : 'index.css' , target : [ 'safari18.4' ] } ,
48+ } )
49+ expect ( snapshot ) . contain ( '&' )
50+ } )
51+
52+ test ( 'target: false with CSS preserves modern syntax' , async ( context ) => {
53+ const { snapshot } = await testBuild ( {
54+ context,
55+ files : { 'index.css' : '.foo { & .bar { color: red } }' } ,
56+ options : { entry : 'index.css' , target : false } ,
57+ } )
58+ // Modern CSS syntax should be preserved when target is false
59+ expect ( snapshot ) . contain ( '&' )
5660 } )
57- // Modern CSS syntax should be preserved when target is false
58- expect ( snapshot ) . contain ( '&' )
5961 } )
6062} )
0 commit comments