Skip to content
public-library›Rules›Zustand›Reset stores between tests and test actions directly

Reset stores between tests and test actions directly

Reset every module-level store to its initial state before each test, including its actions. Test store logic by calling actions through getState(), and use component tests for how the UI uses the store.

In the full rule