Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turbopack build: Skip experimental.esmExternals tests #67901

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/04-architecture/turbopack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ These features are currently not supported:
- We are planning to implement this in the future.
- `experimental.sri.algorithm`
- We are planning to implement this in the future.
- `experimental.esmExternals`
- We are currently not planning to support the legacy esmExternals configuration in Next.js with Turbopack.
- [AMP](/docs/pages/building-your-application/configuring/amp).
- We are currently not planning to support AMP in Next.js with Turbopack.
- Yarn PnP
Expand Down
60 changes: 31 additions & 29 deletions test/integration/externals-esm-loose/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,38 @@ import {
const appDir = join(__dirname, '../')
let appPort
let app
;(process.env.TURBOPACK ? describe.skip : describe)(
"Handle ESM externals with esmExternals: 'loose'",
() => {
;(process.env.TURBOPACK_DEV ? describe.skip : describe)(
'production mode',
() => {
beforeAll(async () => {
await fs.remove(join(appDir, '.next'))
await nextBuild(appDir)
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(() => killApp(app))

describe("Handle ESM externals with esmExternals: 'loose'", () => {
;(process.env.TURBOPACK_DEV ? describe.skip : describe)(
'production mode',
() => {
beforeAll(async () => {
await fs.remove(join(appDir, '.next'))
await nextBuild(appDir)
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(() => killApp(app))
const expected =
/Hello <!-- -->World<!-- -->\+<!-- -->World<!-- -->\+<!-- -->World/

const expected =
/Hello <!-- -->World<!-- -->\+<!-- -->World<!-- -->\+<!-- -->World/
it('should render the static page', async () => {
const html = await renderViaHTTP(appPort, '/static')
expect(html).toMatch(expected)
})

it('should render the static page', async () => {
const html = await renderViaHTTP(appPort, '/static')
expect(html).toMatch(expected)
})
it('should render the ssr page', async () => {
const html = await renderViaHTTP(appPort, '/ssr')
expect(html).toMatch(expected)
})

it('should render the ssr page', async () => {
const html = await renderViaHTTP(appPort, '/ssr')
expect(html).toMatch(expected)
})

it('should render the ssg page', async () => {
const html = await renderViaHTTP(appPort, '/ssg')
expect(html).toMatch(expected)
})
}
)
})
it('should render the ssg page', async () => {
const html = await renderViaHTTP(appPort, '/ssg')
expect(html).toMatch(expected)
})
}
)
}
)
4 changes: 2 additions & 2 deletions test/turbopack-build-tests-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9260,12 +9260,12 @@
},
"test/integration/externals-esm-loose/test/index.test.js": {
"passed": [],
"failed": [
"failed": [],
"pending": [
"Handle ESM externals with esmExternals: 'loose' production mode should render the ssg page",
"Handle ESM externals with esmExternals: 'loose' production mode should render the ssr page",
"Handle ESM externals with esmExternals: 'loose' production mode should render the static page"
],
"pending": [],
"flakey": [],
"runtimeError": false
},
Expand Down
Loading