last appstate reducer unit test

This commit is contained in:
Jason Wall 2020-08-23 10:10:07 -04:00
parent 5ea64d0cb9
commit e3c87cf660

View File

@ -5,7 +5,7 @@ import { Overlap } from '../common/bible-reference';
import { Storable } from '../common/storable';
import { CardType, CardItem } from '../models/card-state';
import { SavedPage } from '../models/page-state';
import { AppState } from '../models/app-state';
import { AppState, User } from '../models/app-state';
import { getCardCacheKey } from '../common/card-cache-operations';
import { MoveDirection } from '../common/move-direction';
import { NoteItem } from '../models/note-state';
@ -537,7 +537,19 @@ describe('AppService Reducer', () => {
//#endregion
// 'SET_USER';
it('SET_USER', () => {
const user: User = {
uid: '1234',
displayName: 'Jason',
email: 'jason@walljm.com',
providerId: 'asdfasf',
};
const action1 = AppActionFactory.newUser(user);
const testState = reducer(preState, action1);
expect(testState.user).toBe(user, 'Should set the user');
});
//#region Notes