()
| 11 | } |
| 12 | |
| 13 | const runTests = () => { |
| 14 | it('should use the not-found page for non-matching routes', async () => { |
| 15 | const browser = await next.browser('/random-content') |
| 16 | expect(await browser.elementByCss('h1').text()).toContain( |
| 17 | 'This Is The Not Found Page' |
| 18 | ) |
| 19 | // should contain root layout content |
| 20 | expect(await browser.elementByCss('#layout-nav').text()).toBe('Navbar') |
| 21 | }) |
| 22 | |
| 23 | it('should allow to have a valid /not-found route', async () => { |
| 24 | const html = await next.render('/not-found') |
| 25 | expect(html).toContain('I am still a valid page') |
| 26 | }) |
| 27 | } |
| 28 | |
| 29 | describe('with default runtime', () => { |
| 30 | runTests() |
no test coverage detected