Skip to content

Commit

Permalink
[test] Add special placeholder if stackframes point into dist dir (#7…
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Mar 4, 2025
1 parent f609222 commit f5f5be6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/development/acceptance-app/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1467,10 +1467,10 @@ describe('ReactRefreshLogBox app', () => {
| ^",
"stack": [
"eval index.js (1:7)",
"<unknown> rsc)/./index.js (<FIXME-project-root>/.next/server/app/server/page.js (43:1)",
"<FIXME-next-dist-dir>",
"<FIXME-file-protocol>",
"eval ./app/server/page.js",
"<unknown> rsc)/./app/server/page.js (<FIXME-project-root>/.next/server/app/server/page.js (33:1)",
"<FIXME-next-dist-dir>",
"<FIXME-file-protocol>",
],
}
Expand Down
2 changes: 2 additions & 0 deletions test/lib/add-redbox-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ declare global {
* `<FIXME-internal-frame>` in the snapshot would be unintended.
* `<FIXME-project-root>` in the snapshot would be unintended.
* `<FIXME-file-protocol>` in the snapshot would be unintended.
* `<FIXME-next-dist-dir>` in the snapshot would be unintended.
* Any node_modules in the snapshot would be unintended.
* Differences in the snapshot between Turbopack and Webpack would be unintended.
*
Expand All @@ -50,6 +51,7 @@ declare global {
* `<FIXME-internal-frame>` in the snapshot would be unintended.
* `<FIXME-project-root>` in the snapshot would be unintended.
* `<FIXME-file-protocol>` in the snapshot would be unintended.
* `<FIXME-next-dist-dir>` in the snapshot would be unintended.
* Any node_modules in the snapshot would be unintended.
* Differences in the snapshot between Turbopack and Webpack would be unintended.
*
Expand Down
2 changes: 2 additions & 0 deletions test/lib/next-test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,8 @@ export async function getRedboxCallStack(
foundInternalFrame = true
} else if (frame.includes('file://')) {
stack.push('<FIXME-file-protocol>')
} else if (frame.includes('.next/')) {
stack.push('<FIXME-next-dist-dir>')
} else {
stack.push(frame)
}
Expand Down

0 comments on commit f5f5be6

Please sign in to comment.