Skip to content

Commit

Permalink
test: improve tests with Immer class
Browse files Browse the repository at this point in the history
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
aleclarson committed Dec 28, 2018
1 parent a4a1e44 commit ddc9b40
Showing 1 changed file with 386 additions and 636 deletions.

0 comments on commit ddc9b40

Please sign in to comment.