Skip to content

Commit 2aaad3e

Browse files
committed
test(runtime): bind the two new dispatch responses through a local, so the type-check debt ledger does not grow
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QE8qk46e5CHJxyQEUjbf8
1 parent 3c63274 commit 2aaad3e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/runtime/src/http-dispatcher.actions-type-dispatch.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,10 @@ describe('REST /actions — flow dispatch (#3915)', () => {
211211
});
212212

213213
const res = await dispatcher.handleActions('/crm_lead/convert_lead/lead_404', 'POST', {}, ctxFor());
214+
const response: any = res.response;
214215

215-
expect(res.response.status).toBe(404);
216-
expect(res.response.body.error.code).toBe('RECORD_NOT_FOUND');
216+
expect(response.status).toBe(404);
217+
expect(response.body.error.code).toBe('RECORD_NOT_FOUND');
217218
// ⛔ The half that makes the status mean anything.
218219
expect(execute).not.toHaveBeenCalled();
219220
});
@@ -229,8 +230,9 @@ describe('REST /actions — flow dispatch (#3915)', () => {
229230
});
230231

231232
const res = await dispatcher.handleActions('/crm_lead/convert_lead', 'POST', {}, ctxFor());
233+
const response: any = res.response;
232234

233-
expect(res.response.status).toBe(200);
235+
expect(response.status).toBe(200);
234236
expect(execute).toHaveBeenCalledTimes(1);
235237
expect((execute.mock.calls[0]?.[1] as any).params.recordId).toBeUndefined();
236238
});

0 commit comments

Comments
 (0)