You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(objectql): collapse the twelve ./registry module-mocks into one factory (#10634)
`vi.mock('./registry', …)` was hand-copied into twelve test files in
`packages/objectql/src`, and the copies had drifted: eleven declared twelve
members, `engine-count-read-filter.test.ts` declared eleven and omitted
`getAllObjects` — the #9002 shape, inert only because no path its suite drives
reaches one of the thirteen `getAllObjects` call sites in this package.
The deciding evidence for collapsing rather than adding the missing line is the
two lesson comments themselves: the #9002 explanation lived in exactly one copy
and the #9154 explanation in nine others, and neither could reach the rest
because there was no shared factory to write them in. Both now live in
`registry-module-mock.ts`, which every call site inherits.
`engine.test.ts` keeps its stateful in-memory registry as per-member overrides
over the shared member set, so it too fails when the shared factory loses a
member. The `async` factory form is what makes importing the shared module legal
under `vi.mock` hoisting.
Test infrastructure only — no production source is touched.
Claude-Session: https://claude.ai/code/session_019yDEhPBC3tcGkW9bkce1HM
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments