Skip to content

Commit

Permalink
chore: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Apr 25, 2022
1 parent a066d2c commit e5cc7d2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/playground/hmr/__tests__/hmr.spec.ts
Expand Up @@ -194,4 +194,16 @@ if (!isBuild) {
btn = await page.$('button')
expect(await btn.textContent()).toBe('Counter 1')
})

test('HTML', async () => {
await page.goto(viteTestUrl + '/dynamic-import/index.html')
let btn = await page.$('button')
expect(await btn.textContent()).toBe('Counter 0')
editFile('dynamic-import/index.html', (code) =>
code.replace('Counter', 'Compteur')
)
await page.waitForNavigation()
btn = await page.$('button')
expect(await btn.textContent()).toBe('Compteur 0')
})
}

0 comments on commit e5cc7d2

Please sign in to comment.