Skip to content

Commit

Permalink
Update static 404 suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jan 27, 2020
1 parent 2010f99 commit 3298409
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/integration/static-404/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const static404 = join(
const appPage = join(appDir, 'pages/_app.js')
const errorPage = join(appDir, 'pages/_error.js')
const buildId = `generateBuildId: () => 'test-id'`
const experimentalConfig = `experimental: { static404: true }`
let app
let appPort

Expand All @@ -34,18 +33,18 @@ describe('Static 404 page', () => {

describe('With config disabled', () => {
it('should not have exported static 404 page', async () => {
await fs.writeFile(nextConfig, `module.exports = { ${buildId} }`)
await fs.writeFile(
nextConfig,
`module.exports = { ${buildId}, experimental: { static404: false } }`
)
await nextBuild(appDir)
expect(await fs.exists(static404)).toBe(false)
})
})

describe('With config enabled', () => {
beforeEach(() =>
fs.writeFile(
nextConfig,
`module.exports = { ${buildId}, ${experimentalConfig} }`
)
fs.writeFile(nextConfig, `module.exports = { ${buildId} }`)
)

it('should export 404 page without custom _error', async () => {
Expand Down

0 comments on commit 3298409

Please sign in to comment.