Skip to content

Commit

Permalink
Improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrwitek committed Oct 31, 2024
1 parent 572d46d commit aa2ad57
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions sdk/sdk-e2e/e2e/armadaProtocolUsers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,27 +135,33 @@ describe('Armada Protocol Users', () => {
})
})

describe(`Positions on ${chainInfo.name}`, () => {
describe(`Positions on ${chainInfo.name} for user ${userAddress.value}`, () => {
const user = User.createFrom({
chainInfo,
wallet: Wallet.createFrom({
address: userAddress,
}),
})
it('should getUserPositions', async () => {
const positions = await sdk.armada.users.getUserPositions({
user,

describe(`getUserPositions`, () => {
it(`should get first position with id: ${userAddress.value}-${fleetAddress.value}`, async () => {
const positions = await sdk.armada.users.getUserPositions({
user,
})
positions[0].id
expect(positions).toHaveLength(1)
expect(positions[0].id.id).toEqual(`${userAddress.value}-${fleetAddress.value}`)
})
expect(positions).toHaveLength(1)
expect(positions[0].id.id).toEqual(`${userAddress.value}-${fleetAddress.value}`)
})

it('should getUserPosition', async () => {
const position = await sdk.armada.users.getUserPosition({
user,
fleetAddress,
describe(`getUserPosition`, () => {
it(`should get user position with id: ${userAddress.value}-${fleetAddress.value}`, async () => {
const position = await sdk.armada.users.getUserPosition({
user,
fleetAddress,
})
expect(position.id.id).toEqual(`${userAddress.value}-${fleetAddress.value}`)
})
expect(position.id.id).toEqual(`${userAddress.value}-${fleetAddress.value}`)
})
})

Expand Down

0 comments on commit aa2ad57

Please sign in to comment.