Setup

Unit testing is important part of every software. For this reason ng-state has simplified test bed setup. In order to setup unit test you need to make few simple actions.

Tell react-state-rxjs that actions are going to run in testing mode:

For Immer

beforeEach(() => {
    ReactStateTestBed.setTestEnvironment(new ImmerDataStrategy());
});

For mmutableJs

beforeEach(() => {
    ReactStateTestBed.setTestEnvironment(new ImmutableJsDataStrategy());
});

Last updated