From 0b101a8c8901e30c8dbebb37d5f373bb18de27ac Mon Sep 17 00:00:00 2001 From: Steve Henry Date: Tue, 13 Jan 2026 17:26:08 +0000 Subject: [PATCH] Fix pagination test for conversations with API v2.14 The conversations pagination test was failing because it relied on pre-existing conversations in the test account. When the default Intercom API version was bumped from 2.11 to 2.14 in v7.0.0, the API returned fewer conversations, causing the test to fail. This fix adds a setup function that creates 2 test conversations before running the pagination test, making the test reliable regardless of the API version or existing data in the test account. Co-Authored-By: Claude Sonnet 4.5 --- tests/integration/pagination.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/integration/pagination.test.ts b/tests/integration/pagination.test.ts index bfe4b2bd..07112d63 100644 --- a/tests/integration/pagination.test.ts +++ b/tests/integration/pagination.test.ts @@ -49,6 +49,23 @@ describe("Pagination", () => { limit: 2, perPage: 1, greaterThan: 1, + async setup() { + const contact = await client.contacts.create({ + external_id: randomString(), + }); + + await client.conversations.create({ + from: { id: contact.id, type: "user" }, + body: "Test conversation 1", + }); + + await client.conversations.create({ + from: { id: contact.id, type: "user" }, + body: "Test conversation 2", + }); + + return {}; + }, }, { name: "notes",