Test mobx-state-tree Models by Recording Snapshots or Patches
Testing models is straightforward. Especially because MST provides powerful tools to track exactly how your state changes over time. Track snapshots, action invocations or even patches to verify the correctness of your actions!
In this lesson you will learn:
- To obtain immutable snapshots of the state using
- To record snapshots using
- To store and test modifications over time using
- Using Jest's snapshot test feature to verify snapshots and patches
- That MST can infer the type of a snapshot for you