File size: 506 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import { nextTestSetup } from 'e2e-utils'
describe('Edge runtime pages-api route', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should work edge runtime', async () => {
const res = await next.fetch('/api/edge')
const text = await res.text()
expect(text).toContain('All Good')
})
it('should work with node runtime', async () => {
const res = await next.fetch('/api/node')
const text = await res.text()
expect(text).toContain('All Good')
})
})
|