Skip to content

Commit 897f0b2

Browse files
committed
chore: disable not entry html hmr test and css hmr test
1 parent 17aea88 commit 897f0b2

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

playground/hmr/__tests__/hmr.spec.ts

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -271,26 +271,27 @@ if (!isBuild) {
271271
await untilUpdated(() => el.textContent(), 'child updated')
272272
})
273273

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+
})
280279

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+
})
288287

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+
})
293292

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) {
294295
test('full-reload encodeURI path', async () => {
295296
await page.goto(
296297
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
@@ -306,7 +307,10 @@ if (!isBuild) {
306307
'title2',
307308
)
308309
})
310+
}
309311

312+
// TODO css hmr
313+
if (!process.env.VITE_TEST_FULL_BUNDLE_MODE) {
310314
test('CSS update preserves query params', async () => {
311315
await page.goto(viteTestUrl)
312316

@@ -336,7 +340,9 @@ if (!isBuild) {
336340

337341
expect((await page.$$('link')).length).toBe(1)
338342
})
343+
}
339344

345+
if (!process.env.VITE_TEST_FULL_BUNDLE_MODE) {
340346
test('not loaded dynamic import', async () => {
341347
await page.goto(viteTestUrl + '/counter/index.html', {
342348
waitUntil: 'load',

0 commit comments

Comments
 (0)