Skip to content

Commit f5f5be6

Browse files
authored
[test] Add special placeholder if stackframes point into dist dir (#76741)
1 parent f609222 commit f5f5be6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Diff for: test/development/acceptance-app/ReactRefreshLogBox.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1467,10 +1467,10 @@ describe('ReactRefreshLogBox app', () => {
14671467
| ^",
14681468
"stack": [
14691469
"eval index.js (1:7)",
1470-
"<unknown> rsc)/./index.js (<FIXME-project-root>/.next/server/app/server/page.js (43:1)",
1470+
"<FIXME-next-dist-dir>",
14711471
"<FIXME-file-protocol>",
14721472
"eval ./app/server/page.js",
1473-
"<unknown> rsc)/./app/server/page.js (<FIXME-project-root>/.next/server/app/server/page.js (33:1)",
1473+
"<FIXME-next-dist-dir>",
14741474
"<FIXME-file-protocol>",
14751475
],
14761476
}

Diff for: test/lib/add-redbox-matchers.ts

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ declare global {
3131
* `<FIXME-internal-frame>` in the snapshot would be unintended.
3232
* `<FIXME-project-root>` in the snapshot would be unintended.
3333
* `<FIXME-file-protocol>` in the snapshot would be unintended.
34+
* `<FIXME-next-dist-dir>` in the snapshot would be unintended.
3435
* Any node_modules in the snapshot would be unintended.
3536
* Differences in the snapshot between Turbopack and Webpack would be unintended.
3637
*
@@ -50,6 +51,7 @@ declare global {
5051
* `<FIXME-internal-frame>` in the snapshot would be unintended.
5152
* `<FIXME-project-root>` in the snapshot would be unintended.
5253
* `<FIXME-file-protocol>` in the snapshot would be unintended.
54+
* `<FIXME-next-dist-dir>` in the snapshot would be unintended.
5355
* Any node_modules in the snapshot would be unintended.
5456
* Differences in the snapshot between Turbopack and Webpack would be unintended.
5557
*

Diff for: 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)