Skip to content

Commit 70e5812

Browse files
committed
test: use the canonical isRecord in the snapshot-inspectors test deps
The createDeps helper inlined the exact drifted array-accepting guard this PR removes from runtime-current-account.ts. Import the canonical helper from lib/utils.js instead so the test deps cannot silently diverge from the production contract. https://claude.ai/code/session_01XNtnkLbBiXZxfQQYLMpucB
1 parent 7a73c6a commit 70e5812

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/snapshot-inspectors.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { describe, expect, it, vi } from "vitest";
22
import { describeAccountsWalSnapshot } from "../lib/storage/snapshot-inspectors.js";
33
import type { SnapshotStats } from "../lib/storage/backup-metadata.js";
4+
import { isRecord } from "../lib/utils.js";
45

56
type WalDeps = Parameters<typeof describeAccountsWalSnapshot>[1];
67

@@ -36,7 +37,7 @@ function createDeps(overrides: Partial<WalDeps> = {}): WalDeps {
3637
readFile: vi.fn(async () =>
3738
makeJournalEntry(makeInnerStorage()),
3839
) as unknown as WalDeps["readFile"],
39-
isRecord: (value: unknown) => typeof value === "object" && value !== null,
40+
isRecord,
4041
computeSha256: fakeSha256,
4142
parseAndNormalizeStorage: vi.fn((data: unknown) => ({
4243
normalized: { accounts: (data as { accounts: unknown[] }).accounts },

0 commit comments

Comments
 (0)