8000 test: fix paths in hmr test · nuxt/nuxt@3b8b213 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b8b213

Browse files
committed
test: fix paths in hmr test
1 parent 8781123 commit 3b8b213

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

test/e2e/hmr.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ if (isBuilt || isWindows) {
141141
test('HMR on page should keep ref state when updating template', async ({ goto, page }) => {
142142
await goto('/state-component')
143143

144-
const pagePath = join(fixtureDir, 'app/pages/state-component.vue')
144+
const pagePath = join(fixtureDir, 'pages/state-component.vue')
145145
const pageContents = readFileSync(pagePath, 'utf8')
146146

147147
const button = page.getByTestId('button')
@@ -170,7 +170,7 @@ if (isBuilt || isWindows) {
170170
test('HMR on page should keep ref state when updating script', async ({ goto, page }) => {
171171
await goto('/state-component')
172172

173-
const pagePath = join(fixtureDir, 'app/pages/state-component.vue')
173+
const pagePath = join(fixtureDir, 'pages/state-component.vue')
174174
const pageContents = readFileSync(pagePath, 'utf8')
175175

176176
const button = page.getByTestId('button')
@@ -235,10 +235,10 @@ if (isBuilt || isWindows) {
235235

236236
await expect(page.getByTestId('example')).toHaveText('test.vue')
237237

238-
renameSync(join(fixtureDir, 'app/components/example/test.vue'), join(fixtureDir, 'app/components/example/example-test.vue'))
238+
renameSync(join(fixtureDir, 'components/example/test.vue'), join(fixtureDir, 'components/example/example-test.vue'))
239239

240240
writeFileSync(
241-
join(fixtureDir, 'app/components/example/example-test.vue'),
241+
join(fixtureDir, 'components/example/example-test.vue'),
242242
`<template><div data-testid="example">example-test.vue</div></template>`,
243243
)
244244

@@ -252,8 +252,8 @@ if (isBuilt || isWindows) {
252252
test('should allow hmr with useAsyncData (#32177)', async ({ page, goto }) => {
253253
await goto('/issues/32177')
254254

255-
const pageContents = readFileSync(join(sourceDir, 'app/pages/issues/32177.vue'), 'utf8')
256-
writeFileSync(join(fixtureDir, 'app/pages/issues/32177.vue'), pageContents.replace('// #HMR_REPLACE', 'console.log("hmr")'))
255+
const pageContents = readFileSync(join(sourceDir, 'pages/issues/32177.vue'), 'utf8')
256+
writeFileSync(join(fixtureDir, 'pages/issues/32177.vue'), pageContents.replace('// #HMR_REPLACE', 'console.log("hmr")'))
257257
await expect(page.getByTestId('contents')).toHaveText('Element 1, Element 2')
258258
})
259259

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
0