Skip to content

Commit 13f63c2

Browse files
committed
test(objectql): drop two as any erasures on ordinary engine reads (#4918 ratchet)
`check:query-options-erasure` reported the test surface growing 267 -> 269: the #5503 test file passed `{ where: { id } } as any` to `findOne` and `{} as any` to `find`. Neither is deliberately off-contract — both values are plain `EngineQueryOptions` that the signatures already infer — so the gate's FIRST remedy applies (drop the assertion), not the `as unknown as EngineQueryOptions` spelling reserved for tests whose subject IS off-contract input. The baseline is untouched: the count returns to its 267 ceiling on its own. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7WetGmnfoXNn8cLieKKmx
1 parent 1d6bf8c commit 13f63c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/objectql/src/engine-autonumber-runtime-owned.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ describe('#5503 — autonumber is runtime-owned: UPDATE', () => {
313313
data: { account_number: 'ACC-888888' },
314314
});
315315
expect(res.record.account_number).toBe('ACC-0001');
316-
const readback = await rig.engine.findOne('an_account', { where: { id } } as any);
316+
const readback = await rig.engine.findOne('an_account', { where: { id } });
317317
expect(readback.account_number).toBe('ACC-0001');
318318
});
319319

@@ -352,7 +352,7 @@ describe('#5503 — autonumber is runtime-owned: UPDATE', () => {
352352
const payload = rig.updatedPayloads.at(-1) ?? {};
353353
expect('account_number' in payload).toBe(false);
354354
expect(payload.name).toBe('bulk'); // the legitimate half of the same write landed
355-
const rows = await rig.engine.find('an_account', {} as any);
355+
const rows = await rig.engine.find('an_account', {});
356356
expect(rows.map((r: any) => r.name)).toEqual(['bulk', 'bulk']); // both rows were rewritten
357357
expect(rows.map((r: any) => r.account_number).sort()).toEqual(['ACC-0001', 'ACC-0002']);
358358
});

0 commit comments

Comments
 (0)