Unverified Commit b4231c03 authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

Turbopack: skip tests for import trace links (#61831)

Some tests in `test/development/acceptance-app/editor-links.test.ts`
test that links in the import trace can be clicked. This is currently
deprioritized with Turbopack, so skip them.


Closes PACK-2450
parent 1d2225ea
...@@ -75,90 +75,94 @@ describe('Error overlay - editor links', () => { ...@@ -75,90 +75,94 @@ describe('Error overlay - editor links', () => {
await cleanup() await cleanup()
}) })
;(process.env.TURBOPACK ? describe.skip : describe)(
it('should be possible to open import trace files on RSC parse error', async () => { 'opening links in import traces',
let editorRequestsCount = 0 () => {
const { session, browser, cleanup } = await sandbox( it('should be possible to open import trace files on RSC parse error', async () => {
next, let editorRequestsCount = 0
new Map([ const { session, browser, cleanup } = await sandbox(
[ next,
'app/page.js', new Map([
outdent` [
'app/page.js',
outdent`
import Component from '../index' import Component from '../index'
export default function Page() { export default function Page() {
return <Component /> return <Component />
} }
`, `,
], ],
['mod1.js', "import './mod2.js'"], ['mod1.js', "import './mod2.js'"],
['mod2.js', '{{{{{'], ['mod2.js', '{{{{{'],
]), ]),
undefined, undefined,
{ {
beforePageLoad(page) { beforePageLoad(page) {
page.route('**/__nextjs_launch-editor**', (route) => { page.route('**/__nextjs_launch-editor**', (route) => {
editorRequestsCount += 1 editorRequestsCount += 1
route.fulfill() route.fulfill()
}) })
}, },
} }
) )
await session.patch( await session.patch(
'index.js', 'index.js',
outdent` outdent`
import './mod1' import './mod1'
export default () => 'hello world' export default () => 'hello world'
` `
) )
expect(await session.hasRedbox()).toBe(true) expect(await session.hasRedbox()).toBe(true)
await clickImportTraceFiles(browser) await clickImportTraceFiles(browser)
await check(() => editorRequestsCount, /4/) await check(() => editorRequestsCount, /4/)
await cleanup() await cleanup()
}) })
it('should be possible to open import trace files on module not found error', async () => { it('should be possible to open import trace files on module not found error', async () => {
let editorRequestsCount = 0 let editorRequestsCount = 0
const { session, browser, cleanup } = await sandbox( const { session, browser, cleanup } = await sandbox(
next, next,
new Map([ new Map([
[ [
'app/page.js', 'app/page.js',
outdent` outdent`
import Component from '../index' import Component from '../index'
export default function Page() { export default function Page() {
return <Component /> return <Component />
} }
`, `,
], ],
['mod1.js', "import './mod2.js'"], ['mod1.js', "import './mod2.js'"],
['mod2.js', 'import "boom"'], ['mod2.js', 'import "boom"'],
]), ]),
undefined, undefined,
{ {
beforePageLoad(page) { beforePageLoad(page) {
page.route('**/__nextjs_launch-editor**', (route) => { page.route('**/__nextjs_launch-editor**', (route) => {
editorRequestsCount += 1 editorRequestsCount += 1
route.fulfill() route.fulfill()
}) })
}, },
} }
) )
await session.patch( await session.patch(
'index.js', 'index.js',
outdent` outdent`
import './mod1' import './mod1'
export default () => 'hello world' export default () => 'hello world'
` `
) )
expect(await session.hasRedbox()).toBe(true) expect(await session.hasRedbox()).toBe(true)
await clickImportTraceFiles(browser) await clickImportTraceFiles(browser)
await check(() => editorRequestsCount, /3/) await check(() => editorRequestsCount, /3/)
await cleanup() await cleanup()
}) })
}
)
}) })
...@@ -1055,11 +1055,11 @@ ...@@ -1055,11 +1055,11 @@
"passed": [ "passed": [
"Error overlay - editor links should be possible to open source file on build error" "Error overlay - editor links should be possible to open source file on build error"
], ],
"failed": [ "failed": [],
"Error overlay - editor links should be possible to open import trace files on RSC parse error", "pending": [
"Error overlay - editor links should be possible to open import trace files on module not found error" "Error overlay - editor opening links in import traces links should be possible to open import trace files on RSC parse error",
"Error overlay - editor opening links in import traces links should be possible to open import trace files on module not found error"
], ],
"pending": [],
"flakey": [], "flakey": [],
"runtimeError": false "runtimeError": false
}, },
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