Skip to content

Commit 7de04a0

Browse files
committed
test(plugin-audit): type the no-registry engine double
Claude-Session: https://claude.ai/code/session_01TyhsxCqpTkk1U5GLD1JETy Co-authored-by: Claude <noreply@anthropic.com>
1 parent 44ed943 commit 7de04a0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/plugins/plugin-audit/src/activity-withheld-update.integration.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,13 @@ describe('[ADR-0139 E6] keptRowsOfParent / computeWithheldRowFilter — a predic
471471

472472
it('an engine with no registry view: denied, and said once', async () => {
473473
const logger = { warn: vi.fn() };
474-
const engine = { find: vi.fn() };
474+
const find = vi.fn();
475+
// No registry view: only a row reader, which the rule must not call.
476+
const engine = { find } as unknown as Parameters<typeof computeWithheldRowFilter>[0];
475477
const filter = await computeWithheldRowFilter(engine, {}, async () => ['x'], logger);
476478
expect(filter).toEqual({ id: '__activity_withheld_row_denied__' });
477479
await computeWithheldRowFilter(engine, {}, async () => ['x'], logger);
478480
expect(logger.warn).toHaveBeenCalledTimes(1);
479-
expect(engine.find).not.toHaveBeenCalled();
481+
expect(find).not.toHaveBeenCalled();
480482
});
481483
});

0 commit comments

Comments
 (0)