@naturalcycles/db-lib 9.24.0 → 9.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,6 +58,14 @@ function runCommonDaoTest(db, quirks = {}) {
58
58
  test('getByIds(...) should return empty', async () => {
59
59
  expect(await dao.getByIds(['abc', 'abcd'])).toEqual([]);
60
60
  });
61
+ // TimeMachine
62
+ if (support.timeMachine) {
63
+ test('getByIds(...) 10 minutes ago should return []', async () => {
64
+ expect(await dao.getByIds([item1.id, 'abc'], {
65
+ readAt: js_lib_1.localTime.now().minus(10, 'minute').unix,
66
+ })).toEqual([]);
67
+ });
68
+ }
61
69
  // SAVE
62
70
  if (support.nullValues) {
63
71
  test('should allow to save and load null values', async () => {
package/package.json CHANGED
@@ -45,7 +45,7 @@
45
45
  "engines": {
46
46
  "node": ">=20.13"
47
47
  },
48
- "version": "9.24.0",
48
+ "version": "9.24.1",
49
49
  "description": "Lowest Common Denominator API to supported Databases",
50
50
  "keywords": [
51
51
  "db",
@@ -80,6 +80,17 @@ export function runCommonDaoTest(db: CommonDB, quirks: CommonDBImplementationQui
80
80
  expect(await dao.getByIds(['abc', 'abcd'])).toEqual([])
81
81
  })
82
82
 
83
+ // TimeMachine
84
+ if (support.timeMachine) {
85
+ test('getByIds(...) 10 minutes ago should return []', async () => {
86
+ expect(
87
+ await dao.getByIds([item1.id, 'abc'], {
88
+ readAt: localTime.now().minus(10, 'minute').unix,
89
+ }),
90
+ ).toEqual([])
91
+ })
92
+ }
93
+
83
94
  // SAVE
84
95
  if (support.nullValues) {
85
96
  test('should allow to save and load null values', async () => {