@@ -4,7 +4,11 @@ const fs = require('fs')
4
4
const path = require ( 'path' )
5
5
6
6
function run ( input , config = { } ) {
7
- return postcss ( [ tailwind ( config ) ] ) . process ( input , { from : path . resolve ( __filename ) } )
7
+ const { currentTestName } = expect . getState ( )
8
+
9
+ return postcss ( [ tailwind ( config ) ] ) . process ( input , {
10
+ from : `${ path . resolve ( __filename ) } ?test=${ currentTestName } `
11
+ } )
8
12
}
9
13
10
14
test ( '@apply' , ( ) => {
@@ -141,9 +145,6 @@ test('@apply', () => {
141
145
142
146
test ( '@apply error with unknown utility' , async ( ) => {
143
147
let config = {
144
- // TODO: Remove this. Some kind of caching causes multiple tests in the same file to break.
145
- __name : "unknown-utility" ,
146
-
147
148
darkMode : 'class' ,
148
149
purge : [ path . resolve ( __dirname , './10-apply.test.html' ) ] ,
149
150
corePlugins : { preflight : false } ,
@@ -166,9 +167,6 @@ test('@apply error with unknown utility', async () => {
166
167
167
168
test ( '@apply error with nested @screen' , async ( ) => {
168
169
let config = {
169
- // TODO: Remove this. Some kind of caching causes multiple tests in the same file to break.
170
- __name : "at-screen" ,
171
-
172
170
darkMode : 'class' ,
173
171
purge : [ path . resolve ( __dirname , './10-apply.test.html' ) ] ,
174
172
corePlugins : { preflight : false } ,
@@ -193,9 +191,6 @@ test('@apply error with nested @screen', async () => {
193
191
194
192
test ( '@apply error with nested @anyatrulehere' , async ( ) => {
195
193
let config = {
196
- // TODO: Remove this. Some kind of caching causes multiple tests in the same file to break.
197
- __name : "at-anything" ,
198
-
199
194
darkMode : 'class' ,
200
195
purge : [ path . resolve ( __dirname , './10-apply.test.html' ) ] ,
201
196
corePlugins : { preflight : false } ,
0 commit comments