Skip to content

Commit 19624a5

Browse files
committed
test(objectql): type the two read calls instead of erasing them to any
check:query-options-erasure counted the two engine.find option bags in the new test as test-surface erasures (236 -> 238). EngineQueryOptions already declares `where` and `context`, so the casts go. Claude-Session: https://claude.ai/code/session_01TEhopqrWQYBycZzyJHpAZr Co-authored-by: Claude <noreply@anthropic.com>
1 parent bb4b168 commit 19624a5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/objectql/src/engine-reference-tenant-scope.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe('[#19808] the lookup existence probe is scoped to the caller\'s organiz
252252
const stored = (door: Door) => storeFor('rts_contact').get(door === 'insert' ? 'ct_new' : 'ct_x');
253253

254254
it('premise: the org-X caller cannot read the org-Y row directly', async () => {
255-
const rows = await engine.find('rts_account', { where: { id: 'acc_y' }, context: MEMBER_X } as any);
255+
const rows = await engine.find('rts_account', { where: { id: 'acc_y' }, context: MEMBER_X });
256256
expect(rows).toEqual([]);
257257
});
258258

@@ -346,7 +346,7 @@ describe('[#19808] the lookup existence probe is scoped to the caller\'s organiz
346346
engine.setTenancyPostureProvider(() => 'group');
347347
const GROUP_MEMBER = { ...MEMBER_X, accessible_org_ids: [ORG_X, ORG_Y] } as unknown as ExecutionContext;
348348

349-
const readable = await engine.find('rts_account', { where: { id: 'acc_y' }, context: GROUP_MEMBER } as any);
349+
const readable = await engine.find('rts_account', { where: { id: 'acc_y' }, context: GROUP_MEMBER });
350350
expect(readable.map((r: any) => r.id)).toEqual(['acc_y']);
351351

352352
await engine.insert('rts_contact', { id: 'ct_grp', title: 'g', account: 'acc_y' }, { context: GROUP_MEMBER } as any);

0 commit comments

Comments
 (0)