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,15 +191,19 @@ describe(`app-dir-hmr`, () => { ...@@ -191,15 +191,19 @@ describe(`app-dir-hmr`, () => {
}) })
const logs = await browser.log() const logs = await browser.log()
// TODO: Should assert on all logs but these are cluttered with logs from our test utils (e.g. playwright tracing or webdriver) // A Turbopack navigation may not trigger a Fast Refresh cycle if the
expect(logs).toEqual( // destination has already been compiled by an earlier test.
expect.arrayContaining([ if (!isTurbopack) {
{ // TODO: Should assert on all logs but these are cluttered with logs from our test utils (e.g. playwright tracing or webdriver)
message: expect.stringContaining('[Fast Refresh] done in'), expect(logs).toEqual(
source: 'log', expect.arrayContaining([
}, {
]) message: expect.stringContaining('[Fast Refresh] done in'),
) source: 'log',
},
])
)
}
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