1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-02 14:15:06 +01:00
metamask-extension/ui/components/app/srp-input
Mark Stacey 1eecc59969 Improve unit tests for SrpInput component (#13803)
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
2022-03-21 18:51:18 -02:30
..
index.js Refactor: Extract SRP input from create vault component (#13720) 2022-03-21 18:51:18 -02:30
parse-secret-recovery-phrase.js Refactor: Extract SRP input from create vault component (#13720) 2022-03-21 18:51:18 -02:30
parse-secret-recovery-phrase'.test.js Refactor: Extract SRP input from create vault component (#13720) 2022-03-21 18:51:18 -02:30
srp-input.js Refactor: Extract SRP input from create vault component (#13720) 2022-03-21 18:51:18 -02:30
srp-input.scss Refactor: Extract SRP input from create vault component (#13720) 2022-03-21 18:51:18 -02:30
srp-input.stories.js Refactor: Extract SRP input from create vault component (#13720) 2022-03-21 18:51:18 -02:30
srp-input.test.js Improve unit tests for SrpInput component (#13803) 2022-03-21 18:51:18 -02:30