Unverified Commit d11156c2 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Turbopack: disable webpack specific test cases (#57423)

These tests test webpack specific behavior

Closes WEB-1857
parent 462b8585
...@@ -520,6 +520,8 @@ describe.each([[''], ['/docs']])( ...@@ -520,6 +520,8 @@ describe.each([[''], ['/docs']])(
} }
}) })
if (!process.env.TURBOPACK) {
// Turbopack doesn't have this restriction
it('should show the error on all pages', async () => { it('should show the error on all pages', async () => {
const aboutPage = join('pages', 'hmr', 'about2.js') const aboutPage = join('pages', 'hmr', 'about2.js')
const aboutContent = await next.readFile(aboutPage) const aboutContent = await next.readFile(aboutPage)
...@@ -527,7 +529,10 @@ describe.each([[''], ['/docs']])( ...@@ -527,7 +529,10 @@ describe.each([[''], ['/docs']])(
try { try {
await renderViaHTTP(next.url, basePath + '/hmr/about2') await renderViaHTTP(next.url, basePath + '/hmr/about2')
await next.patchFile(aboutPage, aboutContent.replace('</div>', 'div')) await next.patchFile(
aboutPage,
aboutContent.replace('</div>', 'div')
)
// Ensure dev server has time to break: // Ensure dev server has time to break:
await new Promise((resolve) => setTimeout(resolve, 2000)) await new Promise((resolve) => setTimeout(resolve, 2000))
...@@ -559,6 +564,7 @@ describe.each([[''], ['/docs']])( ...@@ -559,6 +564,7 @@ describe.each([[''], ['/docs']])(
} }
} }
}) })
}
it('should detect runtime errors on the module scope', async () => { it('should detect runtime errors on the module scope', async () => {
let browser let browser
...@@ -1116,6 +1122,7 @@ describe.each([[''], ['/docs']])( ...@@ -1116,6 +1122,7 @@ describe.each([[''], ['/docs']])(
}) })
}) })
if (!process.env.TURBOPACK) {
it('should have client HMR events in trace file', async () => { it('should have client HMR events in trace file', async () => {
const traceData = await next.readFile('.next/trace') const traceData = await next.readFile('.next/trace')
expect(traceData).toContain('client-hmr-latency') expect(traceData).toContain('client-hmr-latency')
...@@ -1123,6 +1130,7 @@ describe.each([[''], ['/docs']])( ...@@ -1123,6 +1130,7 @@ describe.each([[''], ['/docs']])(
expect(traceData).toContain('client-success') expect(traceData).toContain('client-success')
expect(traceData).toContain('client-full-reload') expect(traceData).toContain('client-full-reload')
}) })
}
it('should have correct compile timing after fixing error', async () => { it('should have correct compile timing after fixing error', async () => {
const pageName = 'pages/auto-export-is-ready.js' const pageName = 'pages/auto-export-is-ready.js'
......
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