Skip to content

Commit

Permalink
Update public references
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Jan 11, 2021
1 parent feec268 commit 10ddb57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/integration/errors-on-output-to-static/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ jest.setTimeout(1000 * 60 * 1)
const appDir = path.join(__dirname, '..')
const nextConfig = path.join(appDir, 'next.config.js')

describe('Errors on output to public', () => {
it('Throws error when `distDir` is set to public', async () => {
await fs.writeFile(nextConfig, `module.exports = { distDir: 'public' }`)
describe('Errors on output to static', () => {
it('Throws error when `distDir` is set to static', async () => {
await fs.writeFile(nextConfig, `module.exports = { distDir: 'static' }`)
const results = await nextBuild(appDir, [], { stdout: true, stderr: true })
expect(results.stdout + results.stderr).toMatch(
/The 'static' directory is reserved in Next\.js and can not be set as/
)
await fs.remove(nextConfig)
})

it('Throws error when export out dir is public', async () => {
it('Throws error when export out dir is static', async () => {
await fs.remove(nextConfig)
await nextBuild(appDir)
const outdir = path.join(appDir, 'public')
const outdir = path.join(appDir, 'static')
const results = await nextExport(
appDir,
{ outdir },
Expand Down

0 comments on commit 10ddb57

Please sign in to comment.