Unverified Commit 2b9425c2 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update TypeScript API routes tests (#12112)

parent eb367db9
......@@ -55,6 +55,16 @@ describe('TypeScript Features', () => {
expect(output).toContain('waiting for typecheck results...')
})
it('should respond to sync API route correctly', async () => {
const data = JSON.parse(await renderViaHTTP(appPort, '/api/sync'))
expect(data).toEqual({ code: 'ok' })
})
it('should respond to async API route correctly', async () => {
const data = JSON.parse(await renderViaHTTP(appPort, '/api/async'))
expect(data).toEqual({ code: 'ok' })
})
it('should not fail to render when an inactive page has an error', async () => {
await killApp(app)
let evilFile = join(appDir, 'pages', 'evil.tsx')
......@@ -78,7 +88,7 @@ export default function EvilPage(): JSX.Element {
})
})
it('should compile the app', async () => {
it('should build the app', async () => {
const output = await nextBuild(appDir, [], { stdout: true })
expect(output.stdout).toMatch(/Compiled successfully/)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment