File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
integrations/tailwindcss-cli/tests Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,55 @@ describe('Build command', () => {
119119 ` )
120120 } )
121121
122+ test ( '--no-autoprefixer (with nesting handling)' , async ( ) => {
123+ // This test mainly checks that we configured Lightning CSS correctly such that we can _still_
124+ // use nesting.
125+ await writeInputFile ( 'index.html' , html `<div class= "select-none" > </ div> ` )
126+ await writeInputFile (
127+ 'index.css' ,
128+ css `
129+ @tailwind utilities;
130+
131+ .foo {
132+ & .bar {
133+ display : flex;
134+ }
135+ }
136+ `
137+ )
138+
139+ await $ ( `${ EXECUTABLE } --input ./src/index.css --output ./dist/main.css` )
140+ let withAutoprefixer = await readOutputFile ( 'main.css' )
141+
142+ expect ( withAutoprefixer ) . toIncludeCss ( css `
143+ .select-none {
144+ -webkit-user-select : none;
145+ user-select : none;
146+ }
147+ ` )
148+
149+ expect ( withAutoprefixer ) . toIncludeCss ( css `
150+ .foo .bar {
151+ display : flex;
152+ }
153+ ` )
154+
155+ await $ ( `${ EXECUTABLE } --input ./src/index.css --output ./dist/main.css --no-autoprefixer` )
156+ let withoutAutoprefixer = await readOutputFile ( 'main.css' )
157+
158+ expect ( withoutAutoprefixer ) . toIncludeCss ( css `
159+ .select-none {
160+ user-select : none;
161+ }
162+ ` )
163+
164+ expect ( withoutAutoprefixer ) . toIncludeCss ( css `
165+ .foo .bar {
166+ display : flex;
167+ }
168+ ` )
169+ } )
170+
122171 test ( '--config (non-existing config file)' , async ( ) => {
123172 await writeInputFile ( 'index.html' , html `<div class= "font-bold" > </ div> ` )
124173
You can’t perform that action at this time.
0 commit comments