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

Function runTests

test/integration/route-load-cancel/test/index.test.ts:21–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19const appDir = join(__dirname, '../')
20
21function runTests() {
22 it('should cancel slow page loads on re-navigation', async () => {
23 const browser = await webdriver(appPort, '/')
24 await waitFor(5000)
25
26 await browser.elementByCss('#link-1').click()
27 await waitFor(1000)
28 await browser.elementByCss('#link-2').click()
29 await waitFor(1000)
30
31 const text = await browser.elementByCss('#page-text').text()
32 expect(text).toMatch(/2/)
33 expect(await browser.eval('window.routeCancelled')).toBe('yes')
34 })
35}
36
37describe('next/dynamic', () => {
38 ;(process.env.TURBOPACK_BUILD ? describe.skip : describe)(

Callers 1

index.test.tsFile · 0.70

Calls 8

waitForFunction · 0.90
webdriverFunction · 0.85
clickMethod · 0.80
elementByCssMethod · 0.80
evalMethod · 0.80
textMethod · 0.65
itFunction · 0.50
expectFunction · 0.50

Tested by

no test coverage detected