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 ng-state that actions are going to run in testing mode:

For Immer

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

For mmutableJs

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

Last updated