Skip to content

Commit

Permalink
fix: adapt to API updates
Browse files Browse the repository at this point in the history
  • Loading branch information
x-oflisback committed Jan 16, 2023
1 parent 1a68f11 commit 6e97505
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
verbose: true,
}
2 changes: 1 addition & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export class Client {
},
}
)
.then((res) => resolve(res.data))
.then((res) => resolve(res.data.data.items))
.catch((e) => reject(e))
})
.catch((e) => reject(e))
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test(

const client = getClient()

const experimentId = await client.executeExperiment({
const experimentId = await client.executeExperimentSync({
caseIds: ['case_1', 'case_2'],
experiment,
workspaceId,
Expand All @@ -76,8 +76,8 @@ test(
workspaceId,
})
expect(trajectories.length).toBe(2)
expect(trajectories[0].length).toBe(502)
expect(trajectories[1].length).toBe(502)
expect(trajectories[0].trajectory.length).toBe(102)
expect(trajectories[1].trajectory.length).toBe(102)

trajectories = await client.getCaseTrajectories({
caseId: 'case_2',
Expand All @@ -86,8 +86,8 @@ test(
workspaceId,
})
expect(trajectories.length).toBe(2)
expect(trajectories[0].length).toBe(502)
expect(trajectories[1].length).toBe(502)
expect(trajectories[0].trajectory.length).toBe(102)
expect(trajectories[1].trajectory.length).toBe(102)
},
20 * 1000
)

0 comments on commit 6e97505

Please sign in to comment.