Skip to content

Commit 2e05c0b

Browse files
author
Fabrice Bascoulergue
committed
Clean up tests
1 parent 4ef47f1 commit 2e05c0b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

tests/client.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ describe('LumClient', () => {
55
const w1 = await LumWallet.fromMnemonic('noodle hope lounge dismiss erase elephant seek crawl check equal city chest', LumConstants.getLumHdPath(0), 'cosmos');
66
const w2 = await LumWallet.fromMnemonic('sick hollow lizard train motion eternal mixture rude section tray nice awful', LumConstants.getLumHdPath(0), 'cosmos');
77

8-
//https://stargate.cosmos.network/testnet
8+
// Can connect to Cosmos testnet for compatibility checks:
9+
// https://stargate.cosmos.network/testnet
910
const clt = await LumClient.connect('http://localhost:26657');
1011
console.log('wallet address', w1.address);
1112
console.log('getChainId', await clt.getChainId());
@@ -34,9 +35,10 @@ describe('LumClient', () => {
3435
],
3536
gas: '180000', // 180k
3637
});
37-
console.log('-------->', res);
38-
38+
console.log('signAndBroadcastTx', res);
3939
console.log('getBalance(w1)', await clt.getBalance(w1.address, 'token'));
4040
console.log('getBalance(w2)', await clt.getBalance(w2.address, 'token'));
41+
42+
// WIP - needs to be automated through CICD
4143
});
4244
});

tests/wallet.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ describe('LumWallet', () => {
1616
expect(LumUtils.isAddressValid(w1.address, LumConstants.LumAddressPrefix)).toBe(true);
1717
expect(LumUtils.isAddressValid(w1.address, undefined)).toBe(true);
1818
expect(LumUtils.isAddressValid(w1.address, 'cosmos')).toBe(false);
19-
expect(w1).toEqual(w2);
20-
expect(w1).toEqual(w3);
21-
expect(w2).toEqual(w3);
19+
expect(w1.address).toEqual(w2.address);
20+
expect(w1.publicKey).toEqual(w2.publicKey);
21+
expect(w1.address).toEqual(w3.address);
22+
expect(w1.publicKey).toEqual(w3.publicKey);
2223

2324
const randomPrivateKey = LumUtils.generatePrivateKey();
2425
expect(randomPrivateKey).toHaveLength(LumConstants.PrivateKeyLength);
@@ -28,8 +29,5 @@ describe('LumWallet', () => {
2829
expect(LumUtils.generateMnemonic(24).split(' ')).toHaveLength(24);
2930
expect(LumWallet.fromMnemonic(LumUtils.generateMnemonic(12))).resolves.toBeInstanceOf(LumWallet);
3031
expect(LumWallet.fromMnemonic(LumUtils.generateMnemonic(24))).resolves.toBeInstanceOf(LumWallet);
31-
32-
// const wallet1 = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic);
33-
// const w = await LumWallet.fromMnemonic(mnemonic, "m/44'/118'/0'/0/0", 'cosmos');
3432
});
3533
});

0 commit comments

Comments
 (0)