@@ -548,29 +548,41 @@ describe("imessage message actions", () => {
|
548 | 548 | |
549 | 549 | // resolveChatGuid synthesizes the chat_identifier; the runtime then |
550 | 550 | // does the chats.list lookup against it. |
551 | | -expect(runtimeMock.resolveChatGuidForTarget).toHaveBeenCalledWith( |
552 | | -expect.objectContaining({ |
553 | | -target: { |
554 | | -kind: "chat_identifier", |
555 | | -chatIdentifier: "iMessage;-;+12069106512", |
| 551 | +expect(runtimeMock.resolveChatGuidForTarget.mock.calls).toStrictEqual([ |
| 552 | +[ |
| 553 | +{ |
| 554 | +target: { |
| 555 | +kind: "chat_identifier", |
| 556 | +chatIdentifier: "iMessage;-;+12069106512", |
| 557 | +}, |
| 558 | +options: imsgOptions(), |
556 | 559 | }, |
557 | | -}), |
558 | | -); |
| 560 | +], |
| 561 | +]); |
559 | 562 | // The cache lookup uses the synthesized chat_identifier as scope so |
560 | 563 | // cross-chat checks have something to match against. |
561 | 564 | expect(runtimeMock.resolveIMessageMessageId).toHaveBeenCalledWith("5", { |
562 | 565 | requireKnownShortId: true, |
563 | | -chatContext: expect.objectContaining({ |
| 566 | +chatContext: { |
| 567 | +chatGuid: undefined, |
564 | 568 | chatIdentifier: "iMessage;-;+12069106512", |
565 | | -}), |
| 569 | +chatId: undefined, |
| 570 | +}, |
566 | 571 | }); |
567 | 572 | // sendReaction lands on the real registered chat guid, not the |
568 | 573 | // synthesized stand-in. |
569 | | -expect(runtimeMock.sendReaction).toHaveBeenCalledWith( |
570 | | -expect.objectContaining({ |
571 | | -chatGuid: "any;-;+12069106512", |
572 | | -}), |
573 | | -); |
| 574 | +expect(runtimeMock.sendReaction.mock.calls).toStrictEqual([ |
| 575 | +[ |
| 576 | +{ |
| 577 | +chatGuid: "any;-;+12069106512", |
| 578 | +messageId: "full-guid", |
| 579 | +reaction: "like", |
| 580 | +remove: undefined, |
| 581 | +partIndex: undefined, |
| 582 | +options: imsgOptions("any;-;+12069106512"), |
| 583 | +}, |
| 584 | +], |
| 585 | +]); |
574 | 586 | }); |
575 | 587 | |
576 | 588 | it("rejects react/edit/unsend when the synthesized chat is not registered", async () => { |
|