I am using RTL with Jest to test a Slate editor. I use .type to emulate a user typing into the editor and expect that Slate's onChange will be called. However, this does not happen.
Here's the sandbox where I reproduced the issue.
To reproduce the behavior:
- Go to 'tests/index.js'
- Run the tests
- There is an assertion that the onChange was called but it fails
I expected that the onChange will be called. This behavior only happens when tests are ran. In a normal browser onChange is indeed called.