Skip to content

Commit b862563

Browse files
author
Fabrice Bascoulergue
committed
Improve faucet tests
1 parent 780a874 commit b862563

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tests/faucet.test.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
import { LumClient, LumConstants, LumMessages, LumWallet } from '../src';
1+
import { LumClient, LumConstants, LumMessages, LumUtils, LumWallet } from '../src';
22

3-
describe('LumClient', () => {
3+
describe('Faucet', () => {
44
let clt: LumClient;
55
let w1: LumWallet;
66

77
beforeAll(async () => {
88
clt = await LumClient.connect('http://node0.testnet.lum.network/rpc');
9-
w1 = await LumWallet.fromMnemonic('noodle hope lounge dismiss erase elephant seek crawl check equal city chest');
10-
console.log(w1.address);
9+
w1 = await LumWallet.fromMnemonic(LumUtils.generateMnemonic());
1110
});
1211

1312
afterAll(async () => {
1413
await expect(clt.disconnect()).resolves.toBeTruthy();
1514
});
1615

17-
it('should build and dispatch a mint message', async () => {
16+
it('Should build and dispatch a mint message', async () => {
1817
const mintMsg = LumMessages.BuildMsgMintAndSend(w1.address, new Date());
19-
2018
const fee = {
2119
amount: [{ denom: LumConstants.LumDenom, amount: '0' }],
2220
gas: '100000',
2321
};
24-
25-
const broadcastResult = await clt.signAndBroadcastTx(w1, [mintMsg], fee, 'You mad bro? You aint got money bro?');
26-
console.log(broadcastResult);
22+
const broadcastResult = await clt.signAndBroadcastTx(w1, [mintMsg], fee, 'I need a dollar!', false);
23+
expect(LumUtils.broadcastTxCommitSuccess(broadcastResult)).toBeTruthy();
2724
});
2825
});

0 commit comments

Comments
 (0)