File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -1197,3 +1197,65 @@ test(
1197
1197
` )
1198
1198
} ,
1199
1199
)
1200
+
1201
+ test (
1202
+ '@theme reference should never emit values' ,
1203
+ {
1204
+ fs : {
1205
+ 'package.json' : json `
1206
+ {
1207
+ "dependencies": {
1208
+ "tailwindcss": "wor kspace: ^",
1209
+ "@tailwindcss / cli": "wor kspace: ^"
1210
+ }
1211
+ }
1212
+ ` ,
1213
+ 'src/index.css' : css `
1214
+ @reference "tailwindcss";
1215
+
1216
+ .keep-me {
1217
+ color : red;
1218
+ }
1219
+ ` ,
1220
+ } ,
1221
+ } ,
1222
+ async ( { fs, spawn, expect } ) => {
1223
+ let process = await spawn (
1224
+ `pnpm tailwindcss --input src/index.css --output dist/out.css --watch` ,
1225
+ )
1226
+ await process . onStderr ( ( m ) => m . includes ( 'Done in' ) )
1227
+
1228
+ expect ( await fs . dumpFiles ( './dist/*.css' ) ) . toMatchInlineSnapshot ( `
1229
+ "
1230
+ --- ./dist/out.css ---
1231
+ .keep-me {
1232
+ color: red;
1233
+ }
1234
+ "
1235
+ ` )
1236
+
1237
+ await fs . write (
1238
+ './src/index.css' ,
1239
+ css `
1240
+ @reference "tailwindcss";
1241
+
1242
+ /* Not a reference! */
1243
+ @theme {
1244
+ - - color - pink: pink;
1245
+ }
1246
+
1247
+ .keep-me {
1248
+ color : red;
1249
+ }
1250
+ ` ,
1251
+ )
1252
+ expect ( await fs . dumpFiles ( './dist/*.css' ) ) . toMatchInlineSnapshot ( `
1253
+ "
1254
+ --- ./dist/out.css ---
1255
+ .keep-me {
1256
+ color: red;
1257
+ }
1258
+ "
1259
+ ` )
1260
+ } ,
1261
+ )
You can’t perform that action at this time.
0 commit comments