rsnext/test/e2e/app-dir/app-simple-routes/app-simple-routes.test.ts
Tobias Koppers 25e6db4274
Turbopack: add edge app routes (#53387)
### What?

* adds middleware manifest and other missing items for edge app routes
* fixes react-server condition in edge context
* fixes node.js route context

---------

Co-authored-by: Alex Kirszenberg <alex.kirszenberg@vercel.com>
2023-08-07 13:00:06 +02:00

28 lines
668 B
TypeScript

import { createNextDescribe } from 'e2e-utils'
const bathPath = process.env.BASE_PATH ?? ''
createNextDescribe(
'app-simple-routes',
{
files: __dirname,
},
({ next }) => {
describe('works with simple routes', () => {
it('renders a node route', async () => {
expect(
JSON.parse(await next.render(bathPath + '/api/node.json'))
).toEqual({
pathname: '/api/node.json',
})
})
it('renders a edge route', async () => {
expect(
JSON.parse(await next.render(bathPath + '/api/edge.json'))
).toEqual({
pathname: '/api/edge.json',
})
})
})
}
)