diff --git a/test/e2e/og-api/index.test.ts b/test/e2e/og-api/index.test.ts index d8b99c848f..7f92a29146 100644 --- a/test/e2e/og-api/index.test.ts +++ b/test/e2e/og-api/index.test.ts @@ -53,7 +53,9 @@ describe('og-api', () => { ) ).toBe(true) }) - } else { + } + + if ((global as any).isNextDev) { it('should throw error when returning a response object in pages/api in node runtime', async () => { const res = await fetchViaHTTP(next.url, '/api/og-wrong-runtime') expect(res.status).toBe(500)