Skip to content

Commit

Permalink
add HydraDX alphanet e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rihyx committed Mar 18, 2024
1 parent 7211238 commit dd750a0
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
33 changes: 33 additions & 0 deletions packages/sdk/tests/acceptance/__snapshots__/sdk.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,39 @@ exports[`sdk getParachainBalances should get expected balances for HydraDX 1`] =
]
`;

exports[`sdk getParachainBalances should get expected balances for HydraDX Alphanet 1`] = `
[
r {
"amount": 0n,
"decimals": 18,
"key": "ftmwh",
"originSymbol": "FTM.wh",
"symbol": "FTM.wh",
},
r {
"amount": 0n,
"decimals": 6,
"key": "usdcwh",
"originSymbol": "USDC.Wh",
"symbol": "USDC.Wh",
},
r {
"amount": 0n,
"decimals": 18,
"key": "dev",
"originSymbol": "DEV",
"symbol": "DEV",
},
r {
"amount": 0n,
"decimals": 12,
"key": "hdx",
"originSymbol": "HDX",
"symbol": "HDX",
},
]
`;

exports[`sdk getParachainBalances should get expected balances for Moonbeam 1`] = `
[
r {
Expand Down
16 changes: 15 additions & 1 deletion packages/sdk/tests/acceptance/sdk.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* eslint-disable jest/no-commented-out-tests */
import { centrifuge, hydraDX, moonbeam } from '@moonbeam-network/xcm-config';
import {
centrifuge,
hydraDX,
hydraDxAlphanet,
moonbeam,
} from '@moonbeam-network/xcm-config';
import { getParachainBalances } from '../../src/sdk';

// E2E balance test wallet
Expand All @@ -24,6 +29,15 @@ describe('sdk', () => {

expect(result).toMatchSnapshot();
});

it(`should get expected balances for ${hydraDxAlphanet.name}`, async () => {
const result = await getParachainBalances(
hydraDxAlphanet,
hydraDXAddress,
);

expect(result).toMatchSnapshot();
});
});
});

Expand Down

0 comments on commit dd750a0

Please sign in to comment.