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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have a basic functionality I want to unit test:
I want to test the content that is passed to onChange explicitly. To do that I use user-event:
and then call
userEvent.click(textinput)and.paste("some-text")In my unit test I see that the update listener is triggered but the content is empty. When I inspect the state with:
the children array is empty (only in unit test, in browser environment it contains the text node)
Are there any examples, resources how to unit test this, or am I missing something? If needed I can prepare a codesandbox
Beta Was this translation helpful? Give feedback.
All reactions