From 9d4bb49af989d6b139391e5cf36a7ba8b0247a68 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Tue, 23 Aug 2022 22:41:38 -0500 Subject: [PATCH] Fix failing e2e getServerSideProps test (#39885) 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 --- test/e2e/getserversideprops/app/pages/500.js | 3 +++ test/e2e/getserversideprops/test/index.test.ts | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 test/e2e/getserversideprops/app/pages/500.js diff --git a/test/e2e/getserversideprops/app/pages/500.js b/test/e2e/getserversideprops/app/pages/500.js new file mode 100644 index 000000000000..54cd77c73178 --- /dev/null +++ b/test/e2e/getserversideprops/app/pages/500.js @@ -0,0 +1,3 @@ +export default function Error() { + return

custom pages/500

+} diff --git a/test/e2e/getserversideprops/test/index.test.ts b/test/e2e/getserversideprops/test/index.test.ts index bf07df48887a..50df0414ee15 100644 --- a/test/e2e/getserversideprops/test/index.test.ts +++ b/test/e2e/getserversideprops/test/index.test.ts @@ -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') } })