You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect(container.textContent).toEqual('Something went wrong.')
115
+
})
116
+
117
+
If the error boundary did not catch the error, the test would fail since the `render` call would throw the error the Component produced.
118
+
119
+
120
+
:::info
121
+
React 18 will call `console.error`with an extended error message.
122
+
React 19 will call `console.warn`with an extended error message.
123
+
124
+
To disable the additional `console.warn` call in React 19, you can provide a custom `onCaughtError` callback e.g. `render(<App />, {onCaughtError: () => {}})`
125
+
`onCaughtError` is not supported in React 18.
126
+
:::
127
+
128
+
</details>
129
+
130
+
<details>
131
+
84
132
<summary>Can I write unit tests withthis library?</summary>
85
133
86
134
Definitely yes! You can write unit and integration tests withthislibrary. See
0 commit comments