-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
test/development/acceptance/__snapshots__/ReactRefreshLogBox.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { nextTestSetup } from 'e2e-utils' | ||
import { assertHasRedbox, getStackFramesContent } from 'next-test-utils' | ||
import { outdent } from 'outdent' | ||
|
||
describe('errors - anonymous-stack-frame', () => { | ||
const { next } = nextTestSetup({ | ||
files: { | ||
'pages/index.js': outdent` | ||
export default function Page() { | ||
[1, 2, 3].map(() => { | ||
throw new Error("anonymous error!"); | ||
}) | ||
}`, | ||
}, | ||
}) | ||
|
||
// TODO: hide the anonymous frames between 2 ignored frames | ||
test('should show anonymous frames from stack trace', async () => { | ||
const browser = await next.browser('/') | ||
|
||
await assertHasRedbox(browser) | ||
|
||
const stack = await getStackFramesContent(browser) | ||
expect(stack).toMatchInlineSnapshot(` | ||
"at Array.map () | ||
at Page (pages/index.js (2:13))" | ||
`) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters