File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1237,14 +1237,32 @@ function defineTest(f: Fixture) {
12371237 logs . push ( msg . text ( ) )
12381238 }
12391239 } )
1240- f . createEditor ( 'src/routes/tailwind/unused.tsx' ) . resave ( )
1241- await page . waitForTimeout ( 200 )
12421240 f . createEditor ( 'src/routes/tailwind/server.tsx' ) . resave ( )
1241+ await expect
1242+ . poll ( ( ) => logs )
1243+ . toEqual ( [
1244+ expect . stringMatching ( / \[ v i t e - r s c : u p d a t e \] .* \/ t a i l w i n d \/ s e r v e r .t s x / ) ,
1245+ ] )
12431246 await page . waitForTimeout ( 200 )
12441247 expect ( logs ) . toEqual ( [
12451248 expect . stringMatching ( / \[ v i t e - r s c : u p d a t e \] .* \/ t a i l w i n d \/ s e r v e r .t s x / ) ,
12461249 ] )
12471250 } )
1251+
1252+ // https://github.com/tailwindlabs/tailwindcss/pull/19745
1253+ test ( 'tailwind force reloads on file changes outside of module graph' , async ( {
1254+ page,
1255+ } ) => {
1256+ await page . goto ( f . url ( ) )
1257+ await waitForHydration ( page )
1258+ const reloaded = page . waitForEvent ( 'framenavigated' , {
1259+ predicate : ( frame ) =>
1260+ frame === page . mainFrame ( ) && frame . url ( ) . startsWith ( f . url ( ) ) ,
1261+ } )
1262+ f . createEditor ( 'src/routes/tailwind/unused.tsx' ) . resave ( )
1263+ await reloaded
1264+ await waitForHydration ( page )
1265+ } )
12481266 } )
12491267
12501268 test ( 'temporary references @js' , async ( { page } ) => {
You can’t perform that action at this time.
0 commit comments