Skip to content

Commit

Permalink
Updates tests due to unflagged sync stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Oct 16, 2024
1 parent 929b6d8 commit 25afc7a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
31 changes: 29 additions & 2 deletions test/development/acceptance-app/ReactRefreshLogBox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,17 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
const stackFrames = await Promise.all(
stackFrameElements.map((f) => f.innerText())
)
expect(stackFrames).toEqual([])
expect(stackFrames).toEqual(
// TODO: Show useful stack
[
// Internal frames of React.
// Feel free to adjust until we show useful stacks.
'',
'',
'',
'',
]
)
} finally {
await cleanup()
}
Expand Down Expand Up @@ -909,6 +919,13 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
Page
app/page.js (5:6)
`,
// TODO: Show useful stack
// Internal frames of React.
// Feel free to adjust until we show useful stacks.
'',
'',
'',
'',
]
: [
outdent`
Expand Down Expand Up @@ -957,7 +974,17 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
const stackFrames = await Promise.all(
stackFrameElements.map((f) => f.innerText())
)
expect(stackFrames).toEqual([])
expect(stackFrames).toEqual(
// TODO: Show useful stack
[
// Internal frames of React.
// Feel free to adjust until we show useful stacks.
'',
'',
'',
'',
]
)
} finally {
await cleanup()
}
Expand Down
18 changes: 8 additions & 10 deletions test/development/app-dir/dynamic-error-trace/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,14 @@ describe('app dir - dynamic error trace', () => {
)
expect(stackFrames).toEqual(
// TODO: Show useful stack
isReactExperimental
? [
// Internal frames of React.
// Feel free to adjust until we show useful stacks.
'',
'',
'',
'',
]
: []
[
// Internal frames of React.
// Feel free to adjust until we show useful stacks.
'',
'',
'',
'',
]
)

const codeframe = await getRedboxSource(browser)
Expand Down

0 comments on commit 25afc7a

Please sign in to comment.