Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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