Skip to content

Commit

Permalink
Turbopack build: Skip experimental.esmExternals tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Jul 18, 2024
1 parent 0be0abf commit d9c0e6b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 31 deletions.
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

0 comments on commit d9c0e6b

Please sign in to comment.