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 index 82a84eab42ac4..eb77983ea7c97 100644 --- 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 @@ -66,25 +66,25 @@ describe('non-root-project-monorepo', () => { 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 |" + "app/source-maps-rsc/page.tsx (13:28) @ innerArrowFunction + + 11 | } + 12 | + > 13 | const innerArrowFunction = () => { + | ^ + 14 | require('../separate-file') + 15 | } + 16 |" `) // 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)" + " + [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 (10:3) + Page + app/source-maps-rsc/page.tsx (4:5)" `) } else { // TODO the function name is incorrect @@ -98,16 +98,16 @@ describe('non-root-project-monorepo', () => { // 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)" + " + 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 (14:3) + innerArrowFunction + app/source-maps-rsc/page.tsx (10:3) + innerFunction + app/source-maps-rsc/page.tsx (4:5)" `) } await browser.close() @@ -128,12 +128,12 @@ describe('non-root-project-monorepo', () => { `) 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)" + "innerArrowFunction + app/source-maps-ssr/page.tsx (15:28) + innerFunction + app/source-maps-ssr/page.tsx (12:3) + Page + app/source-maps-ssr/page.tsx (6:5)" `) } else { // TODO the function name should be hidden @@ -147,20 +147,20 @@ describe('non-root-project-monorepo', () => { // 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)" + "./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 (16:3) + innerArrowFunction + app/source-maps-ssr/page.tsx (12:3) + innerFunction + app/source-maps-ssr/page.tsx (6:5)" `) } await browser.close() 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 23e658726f77d..0dd632cf83eb8 100644 --- a/test/integration/server-side-dev-errors/test/index.test.js +++ b/test/integration/server-side-dev-errors/test/index.test.js @@ -66,10 +66,6 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)).trim() if (isTurbopack) { - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/pages/gsp.js (6:3) @ getStaticProps' + - '\n ⨯ ../../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:2)' + @@ -121,10 +117,6 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)).trim() if (isTurbopack) { - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/pages/gssp.js (6:3) @ getServerSideProps' + - '\n ⨯ ../../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:2)' + @@ -176,10 +168,6 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)).trim() if (isTurbopack) { - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/pages/blog/[slug].js (6:3) @ getServerSideProps' + - '\n ⨯ ../../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:2)' + @@ -231,10 +219,6 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)).trim() if (isTurbopack) { - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/pages/api/hello.js (2:3) @ handler' + - '\n ⨯ ../../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:2)' + @@ -287,10 +271,6 @@ describe('server-side dev errors', () => { const stderrOutput = stripAnsi(stderr.slice(stderrIdx)).trim() // FIXME(veil): error repeated if (isTurbopack) { - expect(stderrOutput).toStartWith( - ' ⨯ ../../test/integration/server-side-dev-errors/pages/api/blog/[slug].js (2:3) @ handler' + - '\n ⨯ ../../test/integration/server-side-dev-errors/pages/api/blog/[slug].js (2:3) @ handler' - ) expect(stderrOutput).toContain( ' ⨯ ReferenceError: missingVar is not defined' + '\n at handler (../../test/integration/server-side-dev-errors/pages/api/blog/[slug].js:2:2)' +