Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions playground/hasWindowsUnicodeFsBug.js

This file was deleted.

2 changes: 1 addition & 1 deletion playground/hmr-ssr/__tests__/hmr-ssr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ describe('hmr works correctly', () => {
})

// TODO
// test.skipIf(hasWindowsUnicodeFsBug)('full-reload encodeURI path', async () => {
// test('full-reload encodeURI path', async () => {
// await page.goto(
// viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
// )
Expand Down
34 changes: 15 additions & 19 deletions playground/hmr/__tests__/hmr.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { beforeAll, describe, expect, it, test } from 'vitest'
import type { Page } from 'playwright-chromium'
import { hasWindowsUnicodeFsBug } from '../../hasWindowsUnicodeFsBug'
import {
addFile,
browser,
Expand Down Expand Up @@ -253,24 +252,21 @@ if (!isBuild) {
await untilUpdated(() => el.textContent(), '3')
})

test.skipIf(hasWindowsUnicodeFsBug)(
'full-reload encodeURI path',
async () => {
await page.goto(
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
)
const el = await page.$('#app')
expect(await el.textContent()).toBe('title')
editFile('unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html', (code) =>
code.replace('title', 'title2'),
)
await page.waitForEvent('load')
await untilUpdated(
async () => (await page.$('#app')).textContent(),
'title2',
)
},
)
test('full-reload encodeURI path', async () => {
await page.goto(
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
)
const el = await page.$('#app')
expect(await el.textContent()).toBe('title')
editFile('unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html', (code) =>
code.replace('title', 'title2'),
)
await page.waitForEvent('load')
await untilUpdated(
async () => (await page.$('#app')).textContent(),
'title2',
)
})

test('CSS update preserves query params', async () => {
await page.goto(viteTestUrl)
Expand Down
3 changes: 1 addition & 2 deletions playground/html/__tests__/html.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { beforeAll, describe, expect, test } from 'vitest'
import { hasWindowsUnicodeFsBug } from '../../hasWindowsUnicodeFsBug'
import {
browserLogs,
editFile,
Expand Down Expand Up @@ -220,7 +219,7 @@ describe('noBody', () => {
})
})

describe.skipIf(hasWindowsUnicodeFsBug)('Unicode path', () => {
describe('Unicode path', () => {
test('direct access', async () => {
await page.goto(
viteTestUrl + '/unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
Expand Down
13 changes: 4 additions & 9 deletions playground/html/vite.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { relative, resolve } from 'node:path'
import { defineConfig } from 'vite'
import { hasWindowsUnicodeFsBug } from '../hasWindowsUnicodeFsBug'

export default defineConfig({
base: './',
Expand All @@ -21,14 +20,10 @@ export default defineConfig({
inline1: resolve(__dirname, 'inline/shared-1.html'),
inline2: resolve(__dirname, 'inline/shared-2.html'),
inline3: resolve(__dirname, 'inline/unique.html'),
...(hasWindowsUnicodeFsBug
? {}
: {
unicodePath: resolve(
__dirname,
'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
),
}),
unicodePath: resolve(
__dirname,
'unicode-path/中文-にほんご-한글-🌕🌖🌗/index.html',
),
linkProps: resolve(__dirname, 'link-props/index.html'),
valid: resolve(__dirname, 'valid.html'),
importmapOrder: resolve(__dirname, 'importmapOrder.html'),
Expand Down
4 changes: 0 additions & 4 deletions playground/vitestGlobalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import fs from 'fs-extra'
import type { GlobalSetupContext } from 'vitest/node'
import type { BrowserServer } from 'playwright-chromium'
import { chromium } from 'playwright-chromium'
import { hasWindowsUnicodeFsBug } from './hasWindowsUnicodeFsBug'

let browserServer: BrowserServer | undefined

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