Skip to content

Commit

Permalink
fix: daoTest to include a timeMachine test
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Nov 3, 2024
1 parent eb9074b commit b654ce0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/testing/daoTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ export function runCommonDaoTest(db: CommonDB, quirks: CommonDBImplementationQui
expect(await dao.getByIds(['abc', 'abcd'])).toEqual([])
})

// TimeMachine
if (support.timeMachine) {
test('getByIds(...) 10 minutes ago should return []', async () => {
expect(
await dao.getByIds([item1.id, 'abc'], {
readAt: localTime.now().minus(10, 'minute').unix,
}),
).toEqual([])
})
}

// SAVE
if (support.nullValues) {
test('should allow to save and load null values', async () => {
Expand Down

0 comments on commit b654ce0

Please sign in to comment.