Rewrite all unit tests in the manner of React Testing Library
__test__/util.ts removed. The functions we could add to this would be provided all by the functionalities of RTL (and their related libraries). We can recreate it when we need again.
Enzyme and the related packages uninstalled
Install @testing-library/user-event@^14.0.0-beta
This provides a user interaction session management via userEvent.setup(). It is useful because we can write tests as if an user actually controls a components in their browser, and is recommended in the doc.
This document recommends not to specify their version in package.json, because it is automatically installed with @testing-library/react, and we should let the former's version be resolved by the latter.
This doesn't mean I uninstalled the /dom package. It's still here as I mentioned above.
May relate to #33 Follows up #50
__test__/util.ts
removed. The functions we could add to this would be provided all by the functionalities of RTL (and their related libraries). We can recreate it when we need again.@testing-library/user-event@^14.0.0-beta
userEvent.setup()
. It is useful because we can write tests as if an user actually controls a components in their browser, and is recommended in the doc.@testing-library/dom
from package.json@testing-library/react
, and we should let the former's version be resolved by the latter./dom
package. It's still here as I mentioned above.