Skip to content

Commit a48aa0a

Browse files
authored
fix: failing integration test (#200)
fix the failing integration test
1 parent 4a46c5b commit a48aa0a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/integration/suite.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,16 +281,14 @@ export function createIntegrationTestsSuite(
281281
});
282282
const content = result.content as {text: string}[];
283283
expect(content.length).toBe(1);
284-
const resultJson = JSON.parse(content[0].text);
285-
const { actors } = resultJson;
286-
expect(actors.length).toBe(resultJson.total);
287-
expect(actors.length).toBeGreaterThan(0);
284+
const outputText = content[0].text;
288285

286+
// Check to ensure that the output string format remains the same.
287+
// If someone changes the output format, this test may stop working
288+
// without actually failing.
289+
expect(outputText).toContain('This Actor');
289290
// Check that no rental Actors are present
290-
for (const actor of actors) {
291-
// Since we now return the pricingInfo as a string, we need to check if it contains the string
292-
expect(actor.pricingInfo).not.toContain('This Actor is rental');
293-
}
291+
expect(outputText).not.toContain('This Actor is rental');
294292

295293
await client.close();
296294
});

0 commit comments

Comments
 (0)