Skip to content

Commit 9211ca7

Browse files
committed
test: simplify locale test approach
1 parent 982bc69 commit 9211ca7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/index.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ describe('index page i18n', () => {
1010
expect(h1.text()).toBe('Spend your crypto in Lugano')
1111
})
1212

13-
it('displays Spanish title with query parameter', async () => {
14-
const component = await mountSuspended(IndexPage, {
15-
route: '/?locale=es',
16-
})
13+
it('switches to Spanish when locale is changed', async () => {
14+
const component = await mountSuspended(IndexPage)
1715

18-
// Manually set locale to test query param handling
16+
// Change locale (simulates what the query param plugin does in production)
1917
const i18n = component.vm.$i18n
2018
await i18n.setLocale('es')
2119

0 commit comments

Comments
 (0)