()
| 19 | const appDir = join(__dirname, '../') |
| 20 | |
| 21 | function 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 | |
| 37 | describe('next/dynamic', () => { |
| 38 | ;(process.env.TURBOPACK_BUILD ? describe.skip : describe)( |
no test coverage detected