Skip to content

Commit d27cd49

Browse files
committed
[test] Add special placeholder if stackframes point into dist dir
Pointing into `.next` indicates a missing sourcemap
1 parent c6ab3d5 commit d27cd49

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/development/acceptance-app/ReactRefreshLogBox.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1496,10 +1496,10 @@ describe('ReactRefreshLogBox app', () => {
14961496
| ^",
14971497
"stack": [
14981498
"eval index.js (1:7)",
1499-
"<unknown> rsc)/./index.js (<FIXME-project-root>/.next/server/app/server/page.js (43:1)",
1499+
"<FIXME-next-dist-dir>",
15001500
"<FIXME-file-protocol>",
15011501
"eval ./app/server/page.js",
1502-
"<unknown> rsc)/./app/server/page.js (<FIXME-project-root>/.next/server/app/server/page.js (33:1)",
1502+
"<FIXME-next-dist-dir>",
15031503
"<FIXME-file-protocol>",
15041504
],
15051505
}

test/lib/next-test-utils.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1456,6 +1456,8 @@ export async function getRedboxCallStack(
14561456
foundInternalFrame = true
14571457
} else if (frame.includes('file://')) {
14581458
stack.push('<FIXME-file-protocol>')
1459+
} else if (frame.includes('.next/')) {
1460+
stack.push('<FIXME-next-dist-dir>')
14591461
} else {
14601462
stack.push(frame)
14611463
}

0 commit comments

Comments
 (0)