> For the complete documentation index, see [llms.txt](https://vytautas.gitbook.io/ng-state/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vytautas.gitbook.io/ng-state/unit-testing/setup.md).

# 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

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

#### For mmutableJs

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