MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / fakeSession

Function fakeSession

apps/api/src/utils/ids.test.ts:28–32  ·  view source on GitHub ↗
(id: string, endedAtMs: number)

Source from the content-addressed store, hash-verified

26
27// withinIdleWindow only reads `id` + `ended_at`; the rest is irrelevant here.
28const fakeSession = (id: string, endedAtMs: number): IClickhouseSession =>
29 ({
30 id,
31 ended_at: formatClickhouseDate(new Date(endedAtMs)),
32 }) as unknown as IClickhouseSession;
33
34afterEach(() => {
35 vi.restoreAllMocks();

Callers 1

ids.test.tsFile · 0.85

Calls 1

formatClickhouseDateFunction · 0.90

Tested by

no test coverage detected