Skip to content

Commit

Permalink
test(data): issue with Date
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWoelki committed Jul 5, 2024
1 parent 5c54198 commit 8d4374a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/data/deck.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ describe('jsonObjectToDeck', () => {
});

it('should convert JSON object to Deck', () => {
const now = new Date();
const jsonObject: DeckJsonStructure = {
id: 'test-id',
name: 'Test Deck',
Expand All @@ -118,8 +119,8 @@ describe('jsonObjectToDeck', () => {
cards: {
'1': {
state: CardState.NEW,
lastReviewDate: new Date(),
nextReviewDate: new Date(),
lastReviewDate: now,
nextReviewDate: now,
} as unknown as CardJsonStructure,
},
};
Expand All @@ -134,8 +135,8 @@ describe('jsonObjectToDeck', () => {
expect(deck.cards['1']).toEqual({
id: '1',
state: CardState.NEW,
lastReviewDate: new Date(),
nextReviewDate: new Date(),
lastReviewDate: now,
nextReviewDate: now,
});
});
});

0 comments on commit 8d4374a

Please sign in to comment.