mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
These tests won't ever be run in a deployed environment, so this removes `skipDeployment` so it's easier to grok which tests are intentionally disabled because they don't work when deployed.
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('standalone mode - tracing-unparsable', () => {
|
|
const dependencies = require('./package.json').dependencies
|
|
|
|
const { next, skipped } = nextTestSetup({
|
|
files: __dirname,
|
|
dependencies,
|
|
skipStart: true,
|
|
})
|
|
|
|
if (skipped) {
|
|
return
|
|
}
|
|
|
|
it('should not error when dynamic require includes non-JS files', async () => {
|
|
let { exitCode } = await next.build()
|
|
expect(exitCode).toBe(0)
|
|
|
|
let trace = await next.readJSON('.next/server/app/page.js.nft.json')
|
|
|
|
expect(trace.files).toContainEqual(
|
|
expect.stringMatching(/.*\/node_modules\/foo\/LICENSE$/)
|
|
)
|
|
expect(trace.files).toContainEqual(
|
|
expect.stringMatching(/.*\/node_modules\/foo\/binary$/)
|
|
)
|
|
expect(trace.files).toContainEqual(
|
|
expect.stringMatching(/.*\/node_modules\/foo\/index\.js$/)
|
|
)
|
|
expect(trace.files).toContainEqual(
|
|
expect.stringMatching(/.*\/node_modules\/foo\/value\.js$/)
|
|
)
|
|
expect(trace.files).toContainEqual(
|
|
expect.stringMatching(/.*\/node_modules\/foo\/package\.json$/)
|
|
)
|
|
})
|
|
})
|