mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
68f42a2fb9
The library `@testing-library/user-event` has been updated to the latest beta version, so that our unit tests better model real user interactions. In particular, I found that previously the `paste` event was missing the `clipboardData` API, so it was impossible to implement any custom handling of paste events (which we will need in later PRs). See the `v14.0.0-beta.1` release notes for a list of all breaking changes [1]. The main change is that all methods now return Promises. The `paste` method has also been dramatically simplified. The unit tests have also been updated to reset all mocks before each test. These tests don't have any shared mocks, but this is generally a good practice, to ensure that tests don't develop accidental inter- dependencies. [1]: https://github.com/testing-library/user-event/releases/tag/v14.0.0-beta.1 |
||
---|---|---|
.. | ||
__mocks__ | ||
components | ||
contexts | ||
css | ||
ducks | ||
helpers | ||
hooks | ||
pages | ||
selectors | ||
store | ||
index.js |