Skip to content

Commit 25afc7a

Browse files
committed
Updates tests due to unflagged sync stack traces
1 parent 929b6d8 commit 25afc7a

File tree

2 files changed

+37
-12
lines changed

2 files changed

+37
-12
lines changed

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

+29-2
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,17 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
852852
const stackFrames = await Promise.all(
853853
stackFrameElements.map((f) => f.innerText())
854854
)
855-
expect(stackFrames).toEqual([])
855+
expect(stackFrames).toEqual(
856+
// TODO: Show useful stack
857+
[
858+
// Internal frames of React.
859+
// Feel free to adjust until we show useful stacks.
860+
'',
861+
'',
862+
'',
863+
'',
864+
]
865+
)
856866
} finally {
857867
await cleanup()
858868
}
@@ -909,6 +919,13 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
909919
Page
910920
app/page.js (5:6)
911921
`,
922+
// TODO: Show useful stack
923+
// Internal frames of React.
924+
// Feel free to adjust until we show useful stacks.
925+
'',
926+
'',
927+
'',
928+
'',
912929
]
913930
: [
914931
outdent`
@@ -957,7 +974,17 @@ describe.each(['default', 'turbo'])('ReactRefreshLogBox app %s', () => {
957974
const stackFrames = await Promise.all(
958975
stackFrameElements.map((f) => f.innerText())
959976
)
960-
expect(stackFrames).toEqual([])
977+
expect(stackFrames).toEqual(
978+
// TODO: Show useful stack
979+
[
980+
// Internal frames of React.
981+
// Feel free to adjust until we show useful stacks.
982+
'',
983+
'',
984+
'',
985+
'',
986+
]
987+
)
961988
} finally {
962989
await cleanup()
963990
}

test/development/app-dir/dynamic-error-trace/index.test.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,14 @@ describe('app dir - dynamic error trace', () => {
4848
)
4949
expect(stackFrames).toEqual(
5050
// TODO: Show useful stack
51-
isReactExperimental
52-
? [
53-
// Internal frames of React.
54-
// Feel free to adjust until we show useful stacks.
55-
'',
56-
'',
57-
'',
58-
'',
59-
]
60-
: []
51+
[
52+
// Internal frames of React.
53+
// Feel free to adjust until we show useful stacks.
54+
'',
55+
'',
56+
'',
57+
'',
58+
]
6159
)
6260

6361
const codeframe = await getRedboxSource(browser)

0 commit comments

Comments
 (0)