Skip to content

Commit

Permalink
Fix failing e2e getServerSideProps test (#39885)
Browse files Browse the repository at this point in the history
After the fix was landed for `_error` being used even when it's a serverless function this test no longer shows the default Vercel error page.  

Fixes: https://github.com/vercel/next.js/runs/7985910009?check_suite_focus=true
  • Loading branch information
ijjk committed Aug 24, 2022
1 parent 88916fb commit 9d4bb49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions test/e2e/getserversideprops/app/pages/500.js
@@ -0,0 +1,3 @@
export default function Error() {
return <p>custom pages/500</p>
}
4 changes: 1 addition & 3 deletions test/e2e/getserversideprops/test/index.test.ts
Expand Up @@ -372,9 +372,7 @@ const runTests = (isDev = false, isDeploy = false) => {
expect(html).toContain('oof')
} else {
expect(res.status).toBe(500)
expect(html).toContain(
isDeploy ? 'FUNCTION_INVOCATION_FAILED' : 'Internal Server Error'
)
expect(html).toContain('custom pages/500')
expect(html).not.toContain('This page could not be found')
}
})
Expand Down

0 comments on commit 9d4bb49

Please sign in to comment.