Skip to content

Commit

Permalink
Merge branch 'canary' into enable/chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Dec 13, 2019
2 parents 8f4dbb5 + fafb466 commit c2a6a5b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/integration/prerender/pages/index.js
Expand Up @@ -29,6 +29,9 @@ const Page = ({ world, time }) => {
<Link href="/blog/[post]" as="/blog/post-1">
<a id="post-1">to dynamic</a>
</Link>
<Link href="/blog/[post]" as="/blog/post-100">
<a id="broken-post">to broken</a>
</Link>
<br />
<Link href="/blog/[post]/[comment]" as="/blog/post-1/comment-1">
<a id="comment-1">to another dynamic</a>
Expand Down
9 changes: 9 additions & 0 deletions test/integration/prerender/test/index.test.js
Expand Up @@ -261,6 +261,15 @@ const runTests = (dev = false) => {
expect(text).toMatch(/post.*?post-1/)
})

it('should reload page on failed data request', async () => {
const browser = await webdriver(appPort, '/')
await waitFor(500)
await browser.eval('window.beforeClick = true')
await browser.click('#broken-post')
await waitFor(1000)
expect(await browser.eval('window.beforeClick')).not.toBe('true')
})

if (dev) {
it('should always call getStaticProps without caching in dev', async () => {
const initialRes = await fetchViaHTTP(appPort, '/something')
Expand Down

0 comments on commit c2a6a5b

Please sign in to comment.