Skip to content

Commit db05a9e

Browse files
hotlongclaude
andcommitted
test(rest): type the /diff range list so the authoring-door pins compile under tsconfig.test.json
The inferred union of the three query literals is not assignable to the door helper's Record<string, string>, which check:test-typecheck reported as TS2345 in a file its ledger does not cover. Claude-Session: https://claude.ai/code/session_local_1d2a197c-c20e-4e90-9be8-413d4d432289 Co-authored-by: Claude <noreply@anthropic.com>
1 parent f4c601e commit db05a9e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/rest/src/meta-history-diff-authoring-door.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ describe('[#20378] a member without an authoring capability is refused /diff and
269269
const { door, draftVersion } = await boot();
270270
const v = await draftVersion('app', 'atlas');
271271
const plain = await door('member', '/diff', 'app', 'atlas');
272-
for (const query of [{ from: '0', to: String(v) }, { from: String(v - 1), to: String(v) }, { from: 'abc' }]) {
272+
const ranges: Record<string, string>[] = [{ from: '0', to: String(v) }, { from: String(v - 1), to: String(v) }, { from: 'abc' }];
273+
for (const query of ranges) {
273274
const res = await door('member', '/diff', 'app', 'atlas', query);
274275
expect(envelope(res), JSON.stringify(query)).toEqual({ status: 403, code: 'FORBIDDEN' });
275276
expect(res.body, JSON.stringify(query)).toEqual(plain.body);

0 commit comments

Comments
 (0)