Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

params.spec.ts

22 lines608 Bytes

1import { expect } from '@playwright/test'
2โ€‹
3import { test } from '@tanstack/router-e2e-utils'
4โ€‹
5test.beforeEach(async ({ page }) => {
6 await page.goto('/')
7})
8โ€‹
9test.use({
10 whitelistErrors: [
11 /Failed to load resource: the server responded with a status of 404/,
12 ],
13})
14test.describe('Unicode route rendering', () => {
15 test('should render non-latin route correctly', async ({ page, baseURL }) => {
16 await page.goto('/๋Œ€ํ•œ๋ฏผ๊ตญ')
17โ€‹
18 await expect(page.locator('body')).toContainText('Hello "/๋Œ€ํ•œ๋ฏผ๊ตญ"!')
19โ€‹
20 expect(page.url()).toBe(`${baseURL}/%EB%8C%80%ED%95%9C%EB%AF%BC%EA%B5%AD`)
21 })
22})