Skip to content

Commit

Permalink
fix: adapt getExperimentTrajectories to API update
Browse files Browse the repository at this point in the history
  • Loading branch information
x-oflisback committed Jan 16, 2023
1 parent 2f563e7 commit 9532401
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export class Client {
},
}
)
.then((res) => resolve(res.data))
.then((res) => resolve(res.data.data.items))
})
.catch((e) => reject(e))
})
Expand Down
12 changes: 12 additions & 0 deletions tests/integration/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ test(
expect(trajectories.length).toBe(2)
expect(trajectories[0].trajectory.length).toBe(102)
expect(trajectories[1].trajectory.length).toBe(102)

trajectories = await client.getExperimentTrajectories({
experimentId,
variableNames: ['inertia1.w', 'inertia1.a'],
workspaceId,
})
expect(trajectories[0].items.length).toBe(2)
expect(trajectories[0].items[0].trajectory.length).toBe(102)
expect(trajectories[0].items[0].trajectory.length).toBe(102)
expect(trajectories[1].items.length).toBe(2)
expect(trajectories[1].items[0].trajectory.length).toBe(102)
expect(trajectories[1].items[0].trajectory.length).toBe(102)
},
20 * 1000
)

0 comments on commit 9532401

Please sign in to comment.