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
Then I report this issue in user-event's repo: testing-library/user-event#858. There is a nice person did some research and find it is an issue of React, and provide me a workaround. But this workaround only works in CodeSandbox, I cannot make it work locally. Currently, I am lost here.
● Test suite failed to run
No hyperscript creator found for tag: <htext>
10 | const initialEditor = (
11 | <editor>
> 12 | <htext />
| ^
13 | </editor>
14 | ) as unknown as PlateEditor<unknown>;
15 |
Do we have any documents about how to use @udecode/plate-test-utils? Thank you.
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
-
May I ask a question? How do you do unit test for Plate?
I am using react testing library, and there is a library called user-event in react testing library. However, the onChange function cannot be triggered when I use 'type' function in user-event. The reason seems described here: https://stackoverflow.com/questions/53598450/how-to-trigger-change-event-on-slate-js-when-testing-with-selenium-or-cypress , it is because 'type' function cannot trigger 'onBeforeInput'.
Then I report this issue in user-event's repo: testing-library/user-event#858. There is a nice person did some research and find it is an issue of React, and provide me a workaround. But this workaround only works in CodeSandbox, I cannot make it work locally. Currently, I am lost here.
So I just wonder how you do unit test for Plate?
Beta Was this translation helpful? Give feedback.
All reactions