-
Notifications
You must be signed in to change notification settings - Fork 26.2k
/
index.test.ts
35 lines (33 loc) · 959 Bytes
/
index.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { createNext } from 'e2e-utils'
describe('ci-missing-typescript-deps', () => {
it('should show missing TypeScript dependencies error in CI', async () => {
const next = await createNext({
files: {
'pages/index.tsx': `
export default function Page() {
return <p>hello world</p>
}
`,
},
env: {
CI: '1',
},
skipStart: true,
})
try {
let error
await next.start().catch((err) => {
error = err
})
expect(error).toBeDefined()
expect(next.cliOutput).toContain(
`It looks like you're trying to use TypeScript but do not have the required package(s) installed.`
)
expect(next.cliOutput).toContain(`Please install`)
expect(next.cliOutput).not.toContain('Call retries were exceeded')
expect(next.cliOutput).not.toContain('WorkerError')
} finally {
await next.destroy()
}
})
})