Add API integration test suite with Postgres and ClickHouse coverage

This commit is contained in:
Mike Cao committed 2026-09-06 16:42:53 -07:00
1 parent 950ae63f87
commit e18769e8cf
59 files changed
+8971 -28

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import type { SeedState } from '../seed/state';
export const TIMEZONE = 'UTC';
/** `startAt`/`endAt` (ms) query params spanning the whole seeded dataset. */
export function dateRange(seed: SeedState, extra: Record<string, string | number> = {}) {
return { startAt: seed.range.startAt, endAt: Date.now(), ...extra };
}
/** `startDate`/`endDate` ISO strings used by report parameters. */
export function dateRangeIso(seed: SeedState) {
return {
startDate: new Date(seed.range.startAt).toISOString(),
endDate: new Date().toISOString(),
};
}