From 9d3367a7333567c4612fd885f6b5430cf1ddf83d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 4 Dec 2024 15:10:26 +0100 Subject: [PATCH] add test case --- .../apps/web/app/layout.tsx | 8 + .../web/app/monorepo-package-rsc/page.tsx | 5 + .../web/app/monorepo-package-ssr/page.tsx | 7 + .../apps/web/app/page.tsx | 3 + .../apps/web/app/separate-file.ts | 1 + .../apps/web/app/source-maps-client/page.tsx | 18 ++ .../apps/web/app/source-maps-rsc/page.tsx | 11 + .../apps/web/app/source-maps-ssr/page.tsx | 13 + .../apps/web/next.config.js | 6 + .../apps/web/package.json | 12 + .../non-root-project-monorepo.test.ts | 223 ++++++++++++++++++ .../non-root-project-monorepo/package.json | 10 + .../packages/my-package/package.json | 4 + .../packages/my-package/typescript.ts | 1 + .../server-side-dev-errors/test/index.test.js | 81 +++---- 15 files changed, 351 insertions(+), 52 deletions(-) create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/layout.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-rsc/page.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-ssr/page.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/page.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/separate-file.ts create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-client/page.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-rsc/page.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-ssr/page.tsx create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/next.config.js create mode 100644 test/e2e/app-dir/non-root-project-monorepo/apps/web/package.json create mode 100644 test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts create mode 100644 test/e2e/app-dir/non-root-project-monorepo/package.json create mode 100644 test/e2e/app-dir/non-root-project-monorepo/packages/my-package/package.json create mode 100644 test/e2e/app-dir/non-root-project-monorepo/packages/my-package/typescript.ts diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/layout.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/layout.tsx new file mode 100644 index 0000000000000..888614deda3ba --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/layout.tsx @@ -0,0 +1,8 @@ +import { ReactNode } from 'react' +export default function Root({ children }: { children: ReactNode }) { + return ( + + {children} + + ) +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-rsc/page.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-rsc/page.tsx new file mode 100644 index 0000000000000..1dcaf5b0c45ca --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-rsc/page.tsx @@ -0,0 +1,5 @@ +import { text } from 'my-package/typescript.ts' + +export default function Page() { + return

{text}

+} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-ssr/page.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-ssr/page.tsx new file mode 100644 index 0000000000000..b66994548f6f5 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/monorepo-package-ssr/page.tsx @@ -0,0 +1,7 @@ +'use client' + +import { text } from 'my-package/typescript.ts' + +export default function Page() { + return

{text}

+} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/page.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/page.tsx new file mode 100644 index 0000000000000..ff7159d9149fe --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/page.tsx @@ -0,0 +1,3 @@ +export default function Page() { + return

hello world

+} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/separate-file.ts b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/separate-file.ts new file mode 100644 index 0000000000000..714323f771cd6 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/separate-file.ts @@ -0,0 +1 @@ +throw new Error('Expected error') diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-client/page.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-client/page.tsx new file mode 100644 index 0000000000000..b0f2aca4f6f86 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-client/page.tsx @@ -0,0 +1,18 @@ +'use client' + +import { useEffect } from 'react' + +export default function Page() { + useEffect(function effectCallback() { + innerFunction() + }) + return

Hello Source Maps

+} + +function innerFunction() { + innerArrowFunction() +} + +const innerArrowFunction = () => { + require('../separate-file') +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-rsc/page.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-rsc/page.tsx new file mode 100644 index 0000000000000..3d1e6c8d1b95c --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-rsc/page.tsx @@ -0,0 +1,11 @@ +export default async function Page({ searchParams }) { + innerFunction() +} + +function innerFunction() { + innerArrowFunction() +} + +const innerArrowFunction = () => { + require('../separate-file') +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-ssr/page.tsx b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-ssr/page.tsx new file mode 100644 index 0000000000000..d36ad3f94b77b --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/app/source-maps-ssr/page.tsx @@ -0,0 +1,13 @@ +'use client' + +export default function Page() { + innerFunction() +} + +function innerFunction() { + innerArrowFunction() +} + +const innerArrowFunction = () => { + require('../separate-file') +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/next.config.js b/test/e2e/app-dir/non-root-project-monorepo/apps/web/next.config.js new file mode 100644 index 0000000000000..807126e4cf0bf --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/next.config.js @@ -0,0 +1,6 @@ +/** + * @type {import('next').NextConfig} + */ +const nextConfig = {} + +module.exports = nextConfig diff --git a/test/e2e/app-dir/non-root-project-monorepo/apps/web/package.json b/test/e2e/app-dir/non-root-project-monorepo/apps/web/package.json new file mode 100644 index 0000000000000..ec93f067d692b --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/apps/web/package.json @@ -0,0 +1,12 @@ +{ + "name": "web", + "version": "0.0.0", + "dependencies": { + "my-package": "workspace:*" + }, + "scripts": { + "dev": "next dev", + "start": "next start", + "build": "next build" + } +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts b/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts new file mode 100644 index 0000000000000..375bc068cb480 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/non-root-project-monorepo.test.ts @@ -0,0 +1,223 @@ +import { nextTestSetup, FileRef } from 'e2e-utils' +import { + assertHasRedbox, + assertNoRedbox, + getRedboxCallStack, + getRedboxSource, +} from 'next-test-utils' +import * as path from 'path' + +describe('non-root-project-monorepo', () => { + const { next, skipped, isTurbopack, isNextDev } = nextTestSetup({ + files: { + apps: new FileRef(path.resolve(__dirname, 'apps')), + packages: new FileRef(path.resolve(__dirname, 'packages')), + 'pnpm-workspace.yaml': `packages: + - 'apps/*' + - 'packages/*' + `, + }, + packageJson: require('./package.json'), + buildCommand: 'pnpm build', + startCommand: (global as any).isNextDev ? 'pnpm dev' : 'pnpm start', + installCommand: 'pnpm i', + skipDeployment: true, + }) + + if (skipped) { + return + } + + describe('monorepo-package', () => { + it('should work during RSC', async () => { + const $ = await next.render$('/monorepo-package-rsc') + expect($('p').text()).toBe('Hello Typescript') + }) + + it('should work during SSR', async () => { + const $ = await next.render$('/monorepo-package-ssr') + expect($('p').text()).toBe('Hello Typescript') + }) + + it('should work on client-side', async () => { + const browser = await next.browser('/monorepo-package-ssr') + expect(await browser.elementByCss('p').text()).toBe('Hello Typescript') + await assertNoRedbox(browser) + expect(await browser.elementByCss('p').text()).toBe('Hello Typescript') + await browser.close() + }) + }) + + if (isNextDev) { + describe('source-maps', () => { + function normalizeStackTrace(stack: string): string { + const isolatedPath = /file:\/\/.*\/next-install-[^/]+\//g + const nonIsolatedPath = + /file:\/\/.*\/test\/e2e\/app-dir\/non-root-project-monorepo\//g + return stack + .replaceAll(nonIsolatedPath, 'file:///') + .replaceAll(isolatedPath, 'file:///') + } + + it('should work on RSC', async () => { + const browser = await next.browser('/source-maps-rsc') + await assertHasRedbox(browser) + + if (isTurbopack) { + // TODO the function name should be hidden + expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` + "./app/source-maps-rsc/page.tsx (9:28) @ innerArrowFunction + + 7 | } + 8 | + > 9 | const innerArrowFunction = () => { + | ^ + 10 | require('../separate-file') + 11 | } + 12 |" + `) + // TODO stacktrace-parser breaks in some cases with the rsc:// protocol + expect(normalizeStackTrace(await getRedboxCallStack(browser))) + .toMatchInlineSnapshot(` + " + [project]/apps/web/app/separate-file.ts [app-rsc] (ecmascript) (rsc://React/Server/file:///apps/web/.next/server/chunks/ssr/apps_web_8d1c0a._.js (7:7) + innerFunction + ./app/source-maps-rsc/page.tsx (6:3) + Page + ./app/source-maps-rsc/page.tsx (2:3)" + `) + } else { + // TODO the function name is incorrect + expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` + "app/separate-file.ts (1:11) @ Error + + > 1 | throw new Error('Expected error') + | ^ + 2 |" + `) + // TODO webpack runtime code shouldn't be included in stack trace + expect(normalizeStackTrace(await getRedboxCallStack(browser))) + .toMatchInlineSnapshot(` + " + rsc)/./app/separate-file.ts (rsc://React/Server/file:///apps/web/.next/server/app/source-maps-rsc/page.js + __webpack_require__ + file:///apps/web/.next/server/webpack-runtime.js + require + app/source-maps-rsc/page.tsx (10:3) + innerArrowFunction + app/source-maps-rsc/page.tsx (6:3) + innerFunction + app/source-maps-rsc/page.tsx (2:3)" + `) + } + await browser.close() + }) + + it('should work on SSR', async () => { + const browser = await next.browser('/source-maps-ssr') + await assertHasRedbox(browser) + + if (isTurbopack) { + // TODO the function name should be hidden + expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` + "./app/separate-file.ts (1:7) @ [project]/apps/web/app/separate-file.ts [app-client] (ecmascript) + + > 1 | throw new Error('Expected error') + | ^ + 2 |" + `) + expect(normalizeStackTrace(await getRedboxCallStack(browser))) + .toMatchInlineSnapshot(` + "innerArrowFunction + ./app/source-maps-ssr/page.tsx (11:28) + innerFunction + ./app/source-maps-ssr/page.tsx (8:3) + Page + ./app/source-maps-ssr/page.tsx (4:3)" + `) + } else { + // TODO the function name should be hidden + expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` + "app/separate-file.ts (1:7) @ eval + + > 1 | throw new Error('Expected error') + | ^ + 2 |" + `) + // TODO webpack runtime code shouldn't be included in stack trace + expect(normalizeStackTrace(await getRedboxCallStack(browser))) + .toMatchInlineSnapshot(` + "./app/separate-file.ts + file:///apps/web/.next/static/chunks/app/source-maps-ssr/page.js (27:1) + options.factory + file:///apps/web/.next/static/chunks/webpack.js (700:31) + __webpack_require__ + file:///apps/web/.next/static/chunks/webpack.js (37:33) + fn + file:///apps/web/.next/static/chunks/webpack.js (357:21) + require + app/source-maps-ssr/page.tsx (12:3) + innerArrowFunction + app/source-maps-ssr/page.tsx (8:3) + innerFunction + app/source-maps-ssr/page.tsx (4:3)" + `) + } + await browser.close() + }) + + it('should work on client-side', async () => { + const browser = await next.browser('/source-maps-client') + await assertHasRedbox(browser) + + if (isTurbopack) { + // TODO the function name should be hidden + expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` + "./app/separate-file.ts (1:7) @ [project]/apps/web/app/separate-file.ts [app-client] (ecmascript) + + > 1 | throw new Error('Expected error') + | ^ + 2 |" + `) + expect(normalizeStackTrace(await getRedboxCallStack(browser))) + .toMatchInlineSnapshot(` + "innerArrowFunction + ./app/source-maps-client/page.tsx (16:28) + innerFunction + ./app/source-maps-client/page.tsx (13:3) + effectCallback + ./app/source-maps-client/page.tsx (7:5)" + `) + } else { + // TODO the function name should be hidden + expect(await getRedboxSource(browser)).toMatchInlineSnapshot(` + "app/separate-file.ts (1:7) @ eval + + > 1 | throw new Error('Expected error') + | ^ + 2 |" + `) + // TODO webpack runtime code shouldn't be included in stack trace + expect(normalizeStackTrace(await getRedboxCallStack(browser))) + .toMatchInlineSnapshot(` + "./app/separate-file.ts + file:///apps/web/.next/static/chunks/app/source-maps-client/page.js (27:1) + options.factory + file:///apps/web/.next/static/chunks/webpack.js (712:31) + __webpack_require__ + file:///apps/web/.next/static/chunks/webpack.js (37:33) + fn + file:///apps/web/.next/static/chunks/webpack.js (369:21) + require + app/source-maps-client/page.tsx (17:3) + innerArrowFunction + app/source-maps-client/page.tsx (13:3) + innerFunction + app/source-maps-client/page.tsx (7:5)" + `) + } + await browser.close() + }) + }) + } +}) diff --git a/test/e2e/app-dir/non-root-project-monorepo/package.json b/test/e2e/app-dir/non-root-project-monorepo/package.json new file mode 100644 index 0000000000000..95dfb209e2315 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/package.json @@ -0,0 +1,10 @@ +{ + "name": "monorepo-root", + "version": "0.0.0", + "private": true, + "scripts": { + "build": "pnpm i && pnpm run --dir apps/web build", + "start": "pnpm run --dir apps/web start", + "dev": "pnpm i && pnpm run --dir apps/web dev" + } +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/packages/my-package/package.json b/test/e2e/app-dir/non-root-project-monorepo/packages/my-package/package.json new file mode 100644 index 0000000000000..a18ca3f579196 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/packages/my-package/package.json @@ -0,0 +1,4 @@ +{ + "name": "my-package", + "version": "0.0.0" +} diff --git a/test/e2e/app-dir/non-root-project-monorepo/packages/my-package/typescript.ts b/test/e2e/app-dir/non-root-project-monorepo/packages/my-package/typescript.ts new file mode 100644 index 0000000000000..110c6254059b1 --- /dev/null +++ b/test/e2e/app-dir/non-root-project-monorepo/packages/my-package/typescript.ts @@ -0,0 +1 @@ +export const text: string = 'Hello Typescript' diff --git a/test/integration/server-side-dev-errors/test/index.test.js b/test/integration/server-side-dev-errors/test/index.test.js index 8c2af6f422346..b0c89ee533d25 100644 --- a/test/integration/server-side-dev-errors/test/index.test.js +++ b/test/integration/server-side-dev-errors/test/index.test.js @@ -66,14 +66,10 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)) if (isTurbopack) { - // FIXME(veil): Paths include root twice. Bug in generated Turbopack sourcemaps. - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/gsp.js (6:3) @ getStaticProps' + - '\n ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/gsp.js (6:3) @ getStaticProps' - ) expect(stderrOutput).toContain( ' ⨯ ReferenceError: missingVar is not defined' + - '\n at getStaticProps (./test/integration/server-side-dev-errors/pages/gsp.js:6:3)' + + // TODO(sokra): Incorrect column number, should be 6:3 + '\n at getStaticProps (../../test/integration/server-side-dev-errors/pages/gsp.js:6:2)' + // TODO(veil): Should be sourcemapped '\n at' ) @@ -120,14 +116,10 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)) if (isTurbopack) { - // FIXME(veil): Paths include root twice. Bug in generated Turbopack sourcemaps. - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/gssp.js (6:3) @ getServerSideProps' + - '\n ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/gssp.js (6:3) @ getServerSideProps' - ) expect(stderrOutput).toContain( ' ⨯ ReferenceError: missingVar is not defined' + - '\n at getServerSideProps (./test/integration/server-side-dev-errors/pages/gssp.js:6:3)' + + // TODO(sokra): Incorrect column number, should be 6:3 + '\n at getServerSideProps (../../test/integration/server-side-dev-errors/pages/gssp.js:6:2)' + // TODO(veil): Should be sourcemapped '\n at' ) @@ -174,14 +166,10 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)) if (isTurbopack) { - // FIXME(veil): Paths include root twice. Bug in generated Turbopack sourcemaps. - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/blog/[slug].js (6:3) @ getServerSideProps' + - '\n ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/blog/[slug].js (6:3) @ getServerSideProps' - ) expect(stderrOutput).toContain( ' ⨯ ReferenceError: missingVar is not defined' + - '\n at getServerSideProps (./test/integration/server-side-dev-errors/pages/blog/[slug].js:6:3)' + + // TODO(sokra): Incorrect column number, should be 6:3 + '\n at getServerSideProps (../../test/integration/server-side-dev-errors/pages/blog/[slug].js:6:2)' + // TODO(veil): Should be sourcemapped '\n at' ) @@ -228,14 +216,9 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)) if (isTurbopack) { - // FIXME(veil): Paths include root twice. Bug in generated Turbopack sourcemaps. - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler' + - '\n ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler' - ) expect(stderrOutput).toContain( ' ⨯ ReferenceError: missingVar is not defined' + - '\n at handler (./test/integration/server-side-dev-errors/pages/api/hello.js:2:3)' + + '\n at handler (../../test/integration/server-side-dev-errors/pages/api/hello.js:2:2)' + // TODO(veil): Should be sourcemapped '\n at' ) @@ -284,14 +267,9 @@ describe('server-side dev errors', () => { // FIXME(veil): error repeated // FIXME(veil): codeframe repeated after " ⨯ unhandledRejection: Error: catch this rejection" if (isTurbopack) { - // FIXME(veil): Paths include root twice. Bug in generated Turbopack sourcemaps. - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/api/blog/[slug].js (2:3) @ handler' + - '\n ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/api/blog/[slug].js (2:3) @ handler' - ) expect(stderrOutput).toContain( - '\n ⨯ Error: missingVar is not defined' + - '\n at handler (./test/integration/server-side-dev-errors/pages/api/blog/[slug].js:2:3)' + + '\n ⨯ ReferenceError: missingVar is not defined' + + '\n at handler (../../test/integration/server-side-dev-errors/pages/api/blog/[slug].js:2:2)' + // TODO(veil): Should be sourcemapped '\n at' ) @@ -333,10 +311,9 @@ describe('server-side dev errors', () => { // FIXME(veil): codeframe repeated after " ⨯ unhandledRejection: Error: catch this rejection" if (isTurbopack) { // TODO(veil): digest: undefined should be omitted? - // FIXME(veil): Paths include root twice. Bug in generated Turbopack sourcemaps. expect(stderrOutput).toMatchInlineSnapshot(` "Error: catch this rejection - at Timeout._onTimeout (../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:19) + at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:19) 5 | export async function getServerSideProps() { 6 | setTimeout(() => { > 7 | Promise.reject(new Error('catch this rejection')) @@ -344,10 +321,10 @@ describe('server-side dev errors', () => { 8 | }, 10) 9 | return { 10 | props: {}, - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-rejection.js (7:20) @ Timeout._onTimeout - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-rejection.js (7:20) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js (7:20) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js (7:20) @ Timeout._onTimeout ⨯ unhandledRejection: Error: catch this rejection - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:20) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:20) { digest: undefined } 5 | export async function getServerSideProps() { @@ -358,7 +335,7 @@ describe('server-side dev errors', () => { 9 | return { 10 | props: {}, ⨯ unhandledRejection: Error: catch this rejection - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:20) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-rejection.js:7:20) { digest: undefined } 5 | export async function getServerSideProps() { @@ -436,7 +413,7 @@ describe('server-side dev errors', () => { // TODO(veil): digest: undefined should be omitted? expect(stderrOutput).toMatchInlineSnapshot(` "Error: - at Timeout._onTimeout (../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) + at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:19) 5 | export async function getServerSideProps() { 6 | setTimeout(() => { > 7 | Promise.reject(new Error()) @@ -444,10 +421,10 @@ describe('server-side dev errors', () => { 8 | }, 10) 9 | return { 10 | props: {}, - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js (7:20) @ Timeout._onTimeout - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js (7:20) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js (7:20) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js (7:20) @ Timeout._onTimeout ⨯ unhandledRejection: Error: - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:20) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:20) { digest: undefined } 5 | export async function getServerSideProps() { @@ -458,7 +435,7 @@ describe('server-side dev errors', () => { 9 | return { 10 | props: {}, ⨯ unhandledRejection: Error: - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:20) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-empty-rejection.js:7:20) { digest: undefined } 5 | export async function getServerSideProps() { @@ -535,7 +512,7 @@ describe('server-side dev errors', () => { // TODO(veil): digest: undefined should be omitted? expect(stderrOutput).toMatchInlineSnapshot(` "Error: catch this exception - at Timeout._onTimeout (../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:10) + at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:10) 5 | export async function getServerSideProps() { 6 | setTimeout(() => { > 7 | throw new Error('catch this exception') @@ -543,10 +520,10 @@ describe('server-side dev errors', () => { 8 | }, 10) 9 | return { 10 | props: {}, - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-exception.js (7:11) @ Timeout._onTimeout - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-exception.js (7:11) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-exception.js (7:11) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-exception.js (7:11) @ Timeout._onTimeout ⨯ uncaughtException: Error: catch this exception - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:11) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:11) { digest: undefined } 5 | export async function getServerSideProps() { @@ -557,7 +534,7 @@ describe('server-side dev errors', () => { 9 | return { 10 | props: {}, ⨯ uncaughtException: Error: catch this exception - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:11) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-exception.js:7:11) { digest: undefined } 5 | export async function getServerSideProps() { @@ -634,7 +611,7 @@ describe('server-side dev errors', () => { // TODO(veil): digest: undefined should be omitted? expect(stderrOutput).toMatchInlineSnapshot(` "Error: - at Timeout._onTimeout (../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) + at Timeout._onTimeout (../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:10) 5 | export async function getServerSideProps() { 6 | setTimeout(() => { > 7 | throw new Error() @@ -642,10 +619,10 @@ describe('server-side dev errors', () => { 8 | }, 10) 9 | return { 10 | props: {}, - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js (7:11) @ Timeout._onTimeout - ⨯ ../../test/integration/server-side-dev-errors/test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js (7:11) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js (7:11) @ Timeout._onTimeout + ⨯ ../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js (7:11) @ Timeout._onTimeout ⨯ uncaughtException: Error: - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:11) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:11) { digest: undefined } 5 | export async function getServerSideProps() { @@ -656,7 +633,7 @@ describe('server-side dev errors', () => { 9 | return { 10 | props: {}, ⨯ uncaughtException: Error: - at Timeout._onTimeout (./test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:11) { + at Timeout._onTimeout (./../../test/integration/server-side-dev-errors/pages/uncaught-empty-exception.js:7:11) { digest: undefined } 5 | export async function getServerSideProps() {