Skip to content

Commit 3186c88

Browse files
committed
fix the tests - order of the Actor run response messages
1 parent 26c34cc commit 3186c88

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/integration/suite.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function callPythonExampleActor(client: Client, selectedToolName: string)
5252
type: 'text',
5353
};
5454
// Parse the JSON to compare objects regardless of property order
55-
const actual = content[content.length - 1];
55+
const actual = content[0];
5656
expect(JSON.parse(actual.text)).toEqual(JSON.parse(expected.text));
5757
expect(actual.type).toBe(expected.type);
5858
}
@@ -344,7 +344,7 @@ export function createIntegrationTestsSuite(
344344

345345
const content = result.content as { text: string }[];
346346

347-
expect(content[content.length - 1]).toEqual(
347+
expect(content[0]).toEqual(
348348
{
349349
text: JSON.stringify([{
350350
first_number: 1,
@@ -772,7 +772,7 @@ export function createIntegrationTestsSuite(
772772
expect(content.length).toBe(2); // Call step returns text summary with embedded schema
773773

774774
// First content: text summary
775-
const runText = content[0].text;
775+
const runText = content[1].text;
776776

777777
// Extract datasetId from the text
778778
const runIdMatch = runText.match(/Run ID: ([^\n]+)\n Dataset ID: ([^\n]+)/);
@@ -828,7 +828,7 @@ export function createIntegrationTestsSuite(
828828
expect(result.content).toBeDefined();
829829
const content = result.content as { text: string; type: string }[];
830830
expect(content.length).toBe(2);
831-
const { text } = content[0];
831+
const { text } = content[1];
832832

833833
// Extract datasetId from the response text
834834
const runIdMatch = text.match(/Run ID: ([^\n]+)\n Dataset ID: ([^\n]+)/);
@@ -886,7 +886,7 @@ export function createIntegrationTestsSuite(
886886
expect(content.length).toBe(2); // Call step returns text summary with embedded schema
887887

888888
// First content: text summary
889-
const runText = content[0].text;
889+
const runText = content[1].text;
890890

891891
// Extract datasetId from the text
892892
const runIdMatch = runText.match(/Run ID: ([^\n]+)\n Dataset ID: ([^\n]+)/);

0 commit comments

Comments
 (0)