fix typecheck error

This commit is contained in:
Kevin Alwell
2025-04-29 12:22:41 -04:00
parent 9c563054e0
commit 1a868d35f3
2 changed files with 17 additions and 12 deletions

View File

@@ -64,15 +64,19 @@ describe.each([
expect(createSpy).toHaveBeenCalledTimes(1);
const payload: any = createSpy.mock.calls[0][0];
const call = createSpy.mock.calls[0];
if (!call) {
throw new Error("Expected createSpy to have been called at least once");
}
const payload: any = call[0];
if (flag) {
/* behaviour when ZDR is *on* */
expect(payload).not.toHaveProperty("previous_response_id");
if (payload.input) {
payload.input.forEach((m: any) =>
expect(m.store === undefined ? false : m.store).toBe(false),
);
payload.input.forEach((m: any) => {
expect(m.store === undefined ? false : m.store).toBe(false);
});
}
} else {
/* behaviour when ZDR is *off* */