Skip to content

Commit

Permalink
WIP - added spec for modal reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathew1011 committed May 13, 2021
1 parent 04b2539 commit 3278d04
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions projects/wvr-elements/src/lib/core/modal/modal.reducers.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { EntityMapOne, Update } from '@ngrx/entity';
import { Modal } from './modal';
import * as fromModalActions from './modal.actions';
import * as fromModalReducers from './modal.reducers';

describe('Modal Reducer', () => {
const modal: Modal = {
name: 'Test Modal',
open: false
};

describe('initial state', () => {

it('should have an initial state', () => {
const {initialState} = fromModalReducers;
const action = {} as any;
expect(fromModalReducers.reducer(undefined, action))
.toBe(initialState);
});

it('should select manifest by name', () => {
expect(fromModalReducers.selectModalByName(modal))
.toEqual(modal.name);
});
});

});

0 comments on commit 3278d04

Please sign in to comment.