Unverified Commit 0d8a33e9 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Keep Webpack-specific HMR log assertion on Webpack

Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
parent 865a4266
...@@ -6,7 +6,7 @@ import path from 'path' ...@@ -6,7 +6,7 @@ import path from 'path'
const envFile = '.env.development.local' const envFile = '.env.development.local'
describe(`app-dir-hmr`, () => { describe(`app-dir-hmr`, () => {
const { next } = nextTestSetup({ const { next, isTurbopack } = nextTestSetup({
files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')), files: new FileRef(path.join(__dirname, 'fixtures', 'default-template')),
patchFileDelay: 1000, patchFileDelay: 1000,
}) })
...@@ -191,6 +191,9 @@ describe(`app-dir-hmr`, () => { ...@@ -191,6 +191,9 @@ describe(`app-dir-hmr`, () => {
}) })
const logs = await browser.log() const logs = await browser.log()
// A Turbopack navigation may not trigger a Fast Refresh cycle if the
// destination has already been compiled by an earlier test.
if (!isTurbopack) {
// TODO: Should assert on all logs but these are cluttered with logs from our test utils (e.g. playwright tracing or webdriver) // TODO: Should assert on all logs but these are cluttered with logs from our test utils (e.g. playwright tracing or webdriver)
expect(logs).toEqual( expect(logs).toEqual(
expect.arrayContaining([ expect.arrayContaining([
...@@ -200,6 +203,7 @@ describe(`app-dir-hmr`, () => { ...@@ -200,6 +203,7 @@ describe(`app-dir-hmr`, () => {
}, },
]) ])
) )
}
expect(logs).not.toEqual( expect(logs).not.toEqual(
expect.arrayContaining([ expect.arrayContaining([
expect.objectContaining({ expect.objectContaining({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment