Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: improve tests with Immer class
Using global state in unit tests is usually a bad idea, which the Immer class lets us avoid. Also, we can monkey-patch the `produce` function in order to transparently append the patch listener to the argument list of all `produce` calls. This makes the tests easier to read, since we can avoid an extra level of indentation added by Prettier.
- Loading branch information