@@ -271,26 +271,27 @@ if (!isBuild) {
271
271
await untilUpdated ( ( ) => el . textContent ( ) , 'child updated' )
272
272
} )
273
273
274
- if ( ! process . env . VITE_TEST_FULL_BUNDLE_MODE ) {
275
- test ( 'plugin hmr handler + custom event' , async ( ) => {
276
- const el = await page . $ ( '.custom' )
277
- editFile ( 'customFile.js' , ( code ) => code . replace ( 'custom' , 'edited' ) )
278
- await untilUpdated ( ( ) => el . textContent ( ) , 'edited' )
279
- } )
274
+ test ( 'plugin hmr handler + custom event' , async ( ) => {
275
+ const el = await page . $ ( '.custom' )
276
+ editFile ( 'customFile.js' , ( code ) => code . replace ( 'custom' , 'edited' ) )
277
+ await untilUpdated ( ( ) => el . textContent ( ) , 'edited' )
278
+ } )
280
279
281
- test ( 'plugin hmr remove custom events' , async ( ) => {
282
- const el = await page . $ ( '.toRemove' )
283
- editFile ( 'customFile.js' , ( code ) => code . replace ( 'custom' , 'edited' ) )
284
- await untilUpdated ( ( ) => el . textContent ( ) , 'edited' )
285
- editFile ( 'customFile.js' , ( code ) => code . replace ( 'edited' , 'custom' ) )
286
- await untilUpdated ( ( ) => el . textContent ( ) , 'edited' )
287
- } )
280
+ test ( 'plugin hmr remove custom events' , async ( ) => {
281
+ const el = await page . $ ( '.toRemove' )
282
+ editFile ( 'customFile.js' , ( code ) => code . replace ( 'custom' , 'edited' ) )
283
+ await untilUpdated ( ( ) => el . textContent ( ) , 'edited' )
284
+ editFile ( 'customFile.js' , ( code ) => code . replace ( 'edited' , 'custom' ) )
285
+ await untilUpdated ( ( ) => el . textContent ( ) , 'edited' )
286
+ } )
288
287
289
- test ( 'plugin client-server communication' , async ( ) => {
290
- const el = await page . $ ( '.custom-communication' )
291
- await untilUpdated ( ( ) => el . textContent ( ) , '3' )
292
- } )
288
+ test ( 'plugin client-server communication' , async ( ) => {
289
+ const el = await page . $ ( '.custom-communication' )
290
+ await untilUpdated ( ( ) => el . textContent ( ) , '3' )
291
+ } )
293
292
293
+ // BreakChange: The html is not a entry, it couldn't be seen also hasn't hmr.
294
+ if ( ! process . env . VITE_TEST_FULL_BUNDLE_MODE ) {
294
295
test ( 'full-reload encodeURI path' , async ( ) => {
295
296
await page . goto (
296
297
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html' ,
@@ -306,7 +307,10 @@ if (!isBuild) {
306
307
'title2' ,
307
308
)
308
309
} )
310
+ }
309
311
312
+ // TODO css hmr
313
+ if ( ! process . env . VITE_TEST_FULL_BUNDLE_MODE ) {
310
314
test ( 'CSS update preserves query params' , async ( ) => {
311
315
await page . goto ( viteTestUrl )
312
316
@@ -336,7 +340,9 @@ if (!isBuild) {
336
340
337
341
expect ( ( await page . $$ ( 'link' ) ) . length ) . toBe ( 1 )
338
342
} )
343
+ }
339
344
345
+ if ( ! process . env . VITE_TEST_FULL_BUNDLE_MODE ) {
340
346
test ( 'not loaded dynamic import' , async ( ) => {
341
347
await page . goto ( viteTestUrl + '/counter/index.html' , {
342
348
waitUntil : 'load' ,
0 commit comments