Skip to content

Testing Library ‐ Turbine

Devrath edited this page Oct 26, 2023 · 4 revisions

github-header-image

Scenario

  • When we are testing the states in a view model or in any other place, There comes a requirement where we need to test the order in which the states are triggered.
  • Say for example, loading started state is triggered ----> then ---> API call is successful is triggered ----> then ---> loading successful state is triggered
  • Now when we test the state reference, only it holds the last state when testing the states.
  • But we might need to check the order of the states triggered and also whether other states are triggered.
  • In such a scenario, we can use turbine.

Library