Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getServerSideProps Test Case #10862

Merged
merged 2 commits into from Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/next/next-server/server/render.tsx
Expand Up @@ -568,7 +568,7 @@ export async function renderToHTML(
;(renderOpts as any).pageData = props
}
} catch (err) {
if (!dev || !err) throw err
if (isDataReq || !dev || !err) throw err
ctx.err = err
renderOpts.err = err
console.error(err)
Expand Down
4 changes: 2 additions & 2 deletions test/integration/getserversideprops/test/index.test.js
Expand Up @@ -295,10 +295,10 @@ const runTests = (dev = false) => {
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.eval('window.beforeClick = "abc"')
await browser.elementByCss('#broken-post').click()
await waitFor(1000)
expect(await browser.eval('window.beforeClick')).not.toBe('true')
expect(await browser.eval('window.beforeClick')).not.toBe('abc')
})

it('should always call getServerSideProps without caching', async () => {
Expand Down