mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-23 07:19:50 -04:00
fix tests
This commit is contained in:
parent
2ff5279084
commit
4fbb7f601d
@ -2,7 +2,7 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { reducer, getNewestStorable } from './app-state-reducer';
|
||||
import { AppActionFactory } from './app-state-actions';
|
||||
import { Overlap } from '../common/bible-reference';
|
||||
import { Storable } from '../common/storable';
|
||||
import { Storable, StorableType } from '../common/storable';
|
||||
import { CardType, CardItem } from '../models/card-state';
|
||||
import { SavedPage } from '../models/page-state';
|
||||
import { AppState, User } from '../models/app-state';
|
||||
@ -14,11 +14,13 @@ describe('getNewestStorable', () => {
|
||||
it('maybeMutateStorable', () => {
|
||||
const s1 = {
|
||||
createdOn: new Date(2019, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: 'test1',
|
||||
};
|
||||
|
||||
const s2 = {
|
||||
createdOn: new Date(2020, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: 'test1',
|
||||
};
|
||||
|
||||
@ -34,6 +36,7 @@ describe('AppService Reducer', () => {
|
||||
user: null,
|
||||
currentCards: {
|
||||
createdOn: new Date(0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: [],
|
||||
},
|
||||
cardCache: {},
|
||||
@ -45,6 +48,7 @@ describe('AppService Reducer', () => {
|
||||
},
|
||||
savedPages: {
|
||||
createdOn: new Date(0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: [
|
||||
{
|
||||
queries: [
|
||||
@ -77,6 +81,7 @@ describe('AppService Reducer', () => {
|
||||
},
|
||||
notes: {
|
||||
createdOn: new Date(0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: [],
|
||||
},
|
||||
savedPagesLoaded: false,
|
||||
@ -84,6 +89,7 @@ describe('AppService Reducer', () => {
|
||||
error: null,
|
||||
settings: {
|
||||
createdOn: new Date(0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: {
|
||||
displaySettings: {
|
||||
showStrongsAsModal: false,
|
||||
@ -129,6 +135,7 @@ describe('AppService Reducer', () => {
|
||||
it('UPDATE_SETTINGS', () => {
|
||||
const settings = {
|
||||
createdOn: new Date(2020, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: {
|
||||
displaySettings: {
|
||||
showStrongsAsModal: true,
|
||||
@ -339,6 +346,7 @@ describe('AppService Reducer', () => {
|
||||
testState2,
|
||||
AppActionFactory.newUpdateSettings({
|
||||
createdOn: new Date(2020, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: {
|
||||
...testState2.settings.value,
|
||||
displaySettings: {
|
||||
@ -369,6 +377,7 @@ describe('AppService Reducer', () => {
|
||||
testState2,
|
||||
AppActionFactory.newUpdateSettings({
|
||||
createdOn: new Date(2020, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: {
|
||||
...testState2.settings.value,
|
||||
displaySettings: {
|
||||
@ -399,6 +408,7 @@ describe('AppService Reducer', () => {
|
||||
testState2,
|
||||
AppActionFactory.newUpdateSettings({
|
||||
createdOn: new Date(2020, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: {
|
||||
...testState2.settings.value,
|
||||
displaySettings: {
|
||||
@ -429,6 +439,7 @@ describe('AppService Reducer', () => {
|
||||
testState2,
|
||||
AppActionFactory.newUpdateSettings({
|
||||
createdOn: new Date(2020, 1, 1, 0, 0, 0, 0).toISOString(),
|
||||
type: StorableType.initial,
|
||||
value: {
|
||||
...testState2.settings.value,
|
||||
displaySettings: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user