MCPcopy
hub / github.com/vercel/next.js / runTests

Function runTests

test/e2e/app-dir/not-found/conflict-route/index.test.ts:13–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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()

Callers 1

index.test.tsFile · 0.70

Calls 6

browserMethod · 0.80
elementByCssMethod · 0.80
textMethod · 0.65
renderMethod · 0.65
itFunction · 0.50
expectFunction · 0.50

Tested by

no test coverage detected