Skip to content

Commit 5c965ab

Browse files
committed
testing react 17
1 parent ffc0767 commit 5c965ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/react/error.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ describe('throws an error while updating in effect cleanup', () => {
466466
fireEvent.click(screen.getByText('close'))
467467
if (reactVersion.startsWith('17.')) {
468468
expect(
469-
errorMessages.some((m) => m.includes('err_in_effect_cleanup')),
470-
).toBe(true)
469+
screen.getByText('Errored: err_in_effect_cleanup'),
470+
).toBeInTheDocument()
471471
} else {
472472
expect(
473473
screen.getByText('Errored: err_in_effect_cleanup'),
@@ -494,8 +494,8 @@ describe('throws an error while updating in effect cleanup', () => {
494494
fireEvent.click(screen.getByText('close'))
495495
if (reactVersion.startsWith('17.')) {
496496
expect(
497-
errorMessages.some((m) => m.includes('err_in_effect_cleanup')),
498-
).toBe(true)
497+
screen.getByText('Errored: err_in_effect_cleanup'),
498+
).toBeInTheDocument()
499499
} else {
500500
expect(
501501
screen.getByText('Errored: err_in_effect_cleanup'),

0 commit comments

Comments
 (0)