Skip to content

Commit 0b101a8

Browse files
steve-henryclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 54865c0 commit 0b101a8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/integration/pagination.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,23 @@ describe("Pagination", () => {
4949
limit: 2,
5050
perPage: 1,
5151
greaterThan: 1,
52+
async setup() {
53+
const contact = await client.contacts.create({
54+
external_id: randomString(),
55+
});
56+
57+
await client.conversations.create({
58+
from: { id: contact.id, type: "user" },
59+
body: "Test conversation 1",
60+
});
61+
62+
await client.conversations.create({
63+
from: { id: contact.id, type: "user" },
64+
body: "Test conversation 2",
65+
});
66+
67+
return {};
68+
},
5269
},
5370
{
5471
name: "notes",

0 commit comments

Comments
 (0)