Skip to content

Commit c2a4ce5

Browse files
authored
test: don't skip unicode related tests anymore (#16339)
1 parent 6711553 commit c2a4ce5

File tree

6 files changed

+21
-45
lines changed

6 files changed

+21
-45
lines changed

playground/hasWindowsUnicodeFsBug.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

playground/hmr-ssr/__tests__/hmr-ssr.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ describe('hmr works correctly', () => {
253253
})
254254

255255
// TODO
256-
// test.skipIf(hasWindowsUnicodeFsBug)('full-reload encodeURI path', async () => {
256+
// test('full-reload encodeURI path', async () => {
257257
// await page.goto(
258258
// viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
259259
// )

playground/hmr/__tests__/hmr.spec.ts

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { beforeAll, describe, expect, it, test } from 'vitest'
22
import type { Page } from 'playwright-chromium'
3-
import { hasWindowsUnicodeFsBug } from '../../hasWindowsUnicodeFsBug'
43
import {
54
addFile,
65
browser,
@@ -253,24 +252,21 @@ if (!isBuild) {
253252
await untilUpdated(() => el.textContent(), '3')
254253
})
255254

256-
test.skipIf(hasWindowsUnicodeFsBug)(
257-
'full-reload encodeURI path',
258-
async () => {
259-
await page.goto(
260-
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
261-
)
262-
const el = await page.$('#app')
263-
expect(await el.textContent()).toBe('title')
264-
editFile('unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html', (code) =>
265-
code.replace('title', 'title2'),
266-
)
267-
await page.waitForEvent('load')
268-
await untilUpdated(
269-
async () => (await page.$('#app')).textContent(),
270-
'title2',
271-
)
272-
},
273-
)
255+
test('full-reload encodeURI path', async () => {
256+
await page.goto(
257+
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
258+
)
259+
const el = await page.$('#app')
260+
expect(await el.textContent()).toBe('title')
261+
editFile('unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html', (code) =>
262+
code.replace('title', 'title2'),
263+
)
264+
await page.waitForEvent('load')
265+
await untilUpdated(
266+
async () => (await page.$('#app')).textContent(),
267+
'title2',
268+
)
269+
})
274270

275271
test('CSS update preserves query params', async () => {
276272
await page.goto(viteTestUrl)

playground/html/__tests__/html.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { beforeAll, describe, expect, test } from 'vitest'
2-
import { hasWindowsUnicodeFsBug } from '../../hasWindowsUnicodeFsBug'
32
import {
43
browserLogs,
54
editFile,
@@ -220,7 +219,7 @@ describe('noBody', () => {
220219
})
221220
})
222221

223-
describe.skipIf(hasWindowsUnicodeFsBug)('Unicode path', () => {
222+
describe('Unicode path', () => {
224223
test('direct access', async () => {
225224
await page.goto(
226225
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',

playground/html/vite.config.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { relative, resolve } from 'node:path'
22
import { defineConfig } from 'vite'
3-
import { hasWindowsUnicodeFsBug } from '../hasWindowsUnicodeFsBug'
43

54
export default defineConfig({
65
base: './',
@@ -21,14 +20,10 @@ export default defineConfig({
2120
inline1: resolve(__dirname, 'inline/shared-1.html'),
2221
inline2: resolve(__dirname, 'inline/shared-2.html'),
2322
inline3: resolve(__dirname, 'inline/unique.html'),
24-
...(hasWindowsUnicodeFsBug
25-
? {}
26-
: {
27-
unicodePath: resolve(
28-
__dirname,
29-
'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
30-
),
31-
}),
23+
unicodePath: resolve(
24+
__dirname,
25+
'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
26+
),
3227
linkProps: resolve(__dirname, 'link-props/index.html'),
3328
valid: resolve(__dirname, 'valid.html'),
3429
importmapOrder: resolve(__dirname, 'importmapOrder.html'),

playground/vitestGlobalSetup.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import fs from 'fs-extra'
33
import type { GlobalSetupContext } from 'vitest/node'
44
import type { BrowserServer } from 'playwright-chromium'
55
import { chromium } from 'playwright-chromium'
6-
import { hasWindowsUnicodeFsBug } from './hasWindowsUnicodeFsBug'
76

87
let browserServer: BrowserServer | undefined
98

@@ -28,9 +27,6 @@ export async function setup({ provide }: GlobalSetupContext): Promise<void> {
2827
.copy(path.resolve(__dirname, '../playground'), tempDir, {
2928
dereference: false,
3029
filter(file) {
31-
if (file.includes('中文-にほんご-한글-🌕🌖🌗')) {
32-
return !hasWindowsUnicodeFsBug
33-
}
3430
file = file.replace(/\\/g, '/')
3531
return !file.includes('__tests__') && !/dist(?:\/|$)/.test(file)
3632
},

0 commit comments

Comments
 (0)