|
22 | 22 |
|
23 | 23 | import { describe, it, expect, beforeAll } from 'vitest'; |
24 | 24 | import { temporalStorageForm } from '@objectstack/core'; |
| 25 | +import type { FilterCondition } from '@objectstack/spec/data'; |
25 | 26 | import { coerceTemporalValue } from './memory-temporal.js'; |
26 | 27 | import { InMemoryDriver } from './memory-driver.js'; |
27 | 28 |
|
@@ -73,7 +74,7 @@ const ROWS = [ |
73 | 74 | ]; |
74 | 75 |
|
75 | 76 | /** The #20176 card's rows, as a `where`, with the count this driver answers. */ |
76 | | -const CARD_WHERE_TWINS: ReadonlyArray<readonly [string, () => Record<string, unknown>, number]> = [ |
| 77 | +const CARD_WHERE_TWINS: ReadonlyArray<readonly [string, () => FilterCondition, number]> = [ |
77 | 78 | ['row 1 — an ISO instant $gte on a date field', () => ({ placed_on: { $gte: '2026-02-01T00:00:00.000Z' } }), 3], |
78 | 79 | ['row 2 — an ISO instant $eq on a date field', () => ({ placed_on: { $eq: '2026-02-01T00:00:00.000Z' } }), 2], |
79 | 80 | ['row 3 — a bare day as the $lte of a datetime', () => ({ opened_at: { $lte: '2026-02-01' } }), 3], |
@@ -101,7 +102,7 @@ describe('[#20176] the where twins of the card\'s rows, on this driver', () => { |
101 | 102 |
|
102 | 103 | for (const [name, where, expected] of CARD_WHERE_TWINS) { |
103 | 104 | it(`${name}: ${expected} of 6`, async () => { |
104 | | - const rows = await driver.find(OBJECT, { where: where() } as any); |
| 105 | + const rows = await driver.find(OBJECT, { where: where() }); |
105 | 106 | expect(rows).toHaveLength(expected); |
106 | 107 | }); |
107 | 108 | } |
|
0 commit comments