You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2020. It is now read-only.
import{NgxsTestingModule,MockedStore,MockedStateContext}from'@ngxs-labs/testing';import{Store}from'@ngxs/store';describe('Test',()=>{letstore: MockedStore;beforeAll(()=>{TestBed.configureTestingModule({imports: [NgxsTestingModule.forRoot([ZooState])]});store=TestBed.get<MockedStore>(Store);});it('patchState have been called',()=>{constctx: MockedStateContext=store.getStateContextMocks('STATE_NAME');expect(ctx.patchState).toHaveBeenCalledWith({animals: 2});})})
This would be nice and help keep tests readable with less lines of codes.
Besides all already implemented methods what do you think is missing? Before editing this issue you were talking about mocking state lifecycle, should we add this to this new MockedStore?
The text was updated successfully, but these errors were encountered: