File size: 637 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import { nextTestSetup } from 'e2e-utils'

const bathPath = process.env.BASE_PATH ?? ''

describe('app-simple-routes', () => {
  const { next } = nextTestSetup({
    files: __dirname,
  })

  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',
      })
    })
  })
})