diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-26 04:58:36 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-26 04:58:36 +0800 |
commit | 87d66ccf6cad43b58a3064dcc3a7e66eced84f66 (patch) | |
tree | e563679842c266ddcc4492af6054dbd22f94dd18 /packages/subproviders/test/unit | |
parent | 7ce1e9b18d30cb76dd61f3859164cb09d091a3dd (diff) | |
download | dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.gz dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.bz2 dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.lz dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.xz dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.tar.zst dexon-sol-tools-87d66ccf6cad43b58a3064dcc3a7e66eced84f66.zip |
Fix Tslint issues
Diffstat (limited to 'packages/subproviders/test/unit')
-rw-r--r-- | packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts index 51308b6c2..77a1ac58e 100644 --- a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts +++ b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts @@ -33,6 +33,9 @@ describe('EthLightwalletSubprovider', () => { return new Promise<lightwallet.keystore>(resolve => { // Create Vault lightwallet.keystore.createVault(vaultOptions, (err: Error, vaultKeystore) => { + if (err) { + throw new Error(`Failed to createVault: ${err}`); + } resolve(vaultKeystore); }); }); @@ -41,6 +44,9 @@ describe('EthLightwalletSubprovider', () => { const deriveKeyFromPasswordAsync = async (vaultKeystore: lightwallet.keystore) => { return new Promise<Uint8Array>(resolve => { vaultKeystore.keyFromPassword(PASSWORD, (err: Error, passwordDerivedKey: Uint8Array) => { + if (err) { + throw new Error(`Failed to get key from password: ${err}`); + } resolve(passwordDerivedKey); }); }); @@ -154,7 +160,7 @@ describe('EthLightwalletSubprovider', () => { params: ['0x0000000000000000000000000000000000000000', nonHexMessage], id: 1, }; - const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => { + const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => { expect(err).to.not.be.a('null'); expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world'); done(); @@ -169,7 +175,7 @@ describe('EthLightwalletSubprovider', () => { params: [nonHexMessage, '0x0000000000000000000000000000000000000000'], id: 1, }; - const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => { + const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => { expect(err).to.not.be.a('null'); expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world'); done(); |