mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Add test for explicitly undefined options
This commit is contained in:
parent
df01734ba2
commit
71a1df7aa7
@ -31,6 +31,18 @@ describe("DirectSecp256k1HdWallet", () => {
|
|||||||
expect(pubkey).not.toEqual(defaultPubkey);
|
expect(pubkey).not.toEqual(defaultPubkey);
|
||||||
expect(address.slice(0, 4)).toEqual("yolo");
|
expect(address.slice(0, 4)).toEqual("yolo");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("works with explicitly undefined options", async () => {
|
||||||
|
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(defaultMnemonic, {
|
||||||
|
bip39Password: undefined,
|
||||||
|
hdPaths: undefined,
|
||||||
|
prefix: undefined,
|
||||||
|
});
|
||||||
|
expect(wallet.mnemonic).toEqual(defaultMnemonic);
|
||||||
|
const [{ pubkey, address }] = await wallet.getAccounts();
|
||||||
|
expect(pubkey).toEqual(defaultPubkey);
|
||||||
|
expect(address).toEqual(defaultAddress);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("generate", () => {
|
describe("generate", () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user