mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
20 lines
456 B
TypeScript
20 lines
456 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { check } from 'next-test-utils'
|
|
|
|
describe('ENOENT during require', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
it('should show ENOENT error correctly', async () => {
|
|
await next.fetch('/')
|
|
|
|
await check(() => {
|
|
expect(next.cliOutput).toContain(
|
|
"ENOENT: no such file or directory, open 'does-not-exist.txt'"
|
|
)
|
|
return 'yes'
|
|
}, 'yes')
|
|
})
|
|
})
|