Skip to content

Commit c0f639c

Browse files
committed
Add an explanation for the rest of duplicates
1 parent 5dc3d50 commit c0f639c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/react-dom/src/__tests__/ReactDOMConsoleErrorReporting-test.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ describe('ReactDOMConsoleErrorReporting', () => {
166166
}),
167167
],
168168
[
169-
// TODO: This is duplicated only with createRoot. Why?
169+
// This is only duplicated with createRoot
170+
// because it retries once with a sync render.
170171
expect.objectContaining({
171172
message: 'Boom',
172173
}),
@@ -181,7 +182,8 @@ describe('ReactDOMConsoleErrorReporting', () => {
181182
}),
182183
],
183184
[
184-
// TODO: This is duplicated only with createRoot. Why?
185+
// This is only duplicated with createRoot
186+
// because it retries once with a sync render.
185187
expect.stringContaining('Error: Uncaught [Error: Boom]'),
186188
expect.objectContaining({
187189
message: 'Boom',
@@ -246,7 +248,8 @@ describe('ReactDOMConsoleErrorReporting', () => {
246248
}),
247249
],
248250
[
249-
// TODO: This is duplicated only with createRoot. Why?
251+
// This is only duplicated with createRoot
252+
// because it retries once with a sync render.
250253
expect.objectContaining({
251254
message: 'Boom',
252255
}),
@@ -261,7 +264,8 @@ describe('ReactDOMConsoleErrorReporting', () => {
261264
}),
262265
],
263266
[
264-
// TODO: This is duplicated only with createRoot. Why?
267+
// This is only duplicated with createRoot
268+
// because it retries once with a sync render.
265269
expect.stringContaining('Error: Uncaught [Error: Boom]'),
266270
expect.objectContaining({
267271
message: 'Boom',

0 commit comments

Comments
 (0)