Skip to content

Commit 949892a

Browse files
committed
test(service-automation): type the oauth2-grant test doubles for the test-typecheck layer
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cxkPFWL5Ht4oxW9eG5
1 parent ffd4832 commit 949892a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/services/service-automation/src/oauth2-grant/authorization.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ describe('ADR-0143 D5 — a begun connect is taken once', () => {
115115
await store.put('st', pending());
116116
// The other replica read the same entry and deleted it first.
117117
const realDelete = kv.delete.bind(kv);
118-
(kv as any).delete = async (key: string, opts: { ifVersion?: number }) => {
118+
(kv as any).delete = async (key: string, opts: Parameters<IKV['delete']>[1]) => {
119119
await realDelete(key);
120120
return realDelete(key, opts);
121121
};

‎packages/services/service-automation/src/oauth2-grant/grant-handle.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ describe('ADR-0143 D4 — client_credentials', () => {
143143
expect(sent).toEqual(['dummy-at-1', 'dummy-at-2']);
144144

145145
accept.clear();
146-
const refused = await callWithBorrowedCredential(handle, upstream as never).catch((e) => e);
146+
const refused = (await callWithBorrowedCredential(handle, upstream as never).catch((e: Error) => e)) as Error;
147147
expect(refused).toMatchObject({ status: 503, code: 'SERVICE_UNAVAILABLE' });
148148
expect(String(refused.message)).toContain("connector instance 'crm'");
149149
expect(String(refused.message)).not.toContain('dummy-at');

0 commit comments

Comments
 (0)