diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-17 18:59:02 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-17 18:59:02 +0800 |
commit | bf8ac3b9e6ee59f267f7850418febfe84dedceb8 (patch) | |
tree | 0617e583892f9a8fe96a55dcac3a7f9af1ddae10 /packages/subproviders/test/unit | |
parent | edcdc9b1b903158cc61529853d7e9028ecbc266a (diff) | |
download | dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.gz dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.bz2 dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.lz dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.xz dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.zst dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.zip |
Fix tslint issues
Diffstat (limited to 'packages/subproviders/test/unit')
-rw-r--r-- | packages/subproviders/test/unit/ledger_subprovider_test.ts | 2 | ||||
-rw-r--r-- | packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts index edff5144e..a1d146dbc 100644 --- a/packages/subproviders/test/unit/ledger_subprovider_test.ts +++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts @@ -55,7 +55,7 @@ describe('LedgerSubprovider', () => { return ecSignature; }, transport: { - close: _.noop, + close: _.noop.bind(_), } as LedgerCommunicationClient, }; // tslint:enable:no-object-literal-type-assertion diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts index c437d0815..05f213cf5 100644 --- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts +++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts @@ -60,9 +60,9 @@ describe('NonceTrackerSubprovider', () => { const payload = { ...getTransactionCountPayload, params: ['0x0', 'pending'] }; - const response = await promisify<any>(provider.sendAsync, provider)(payload); + const response = await promisify<any>(provider.sendAsync.bind(provider))(payload); expect(response.result).to.be.eq('0x00'); - const secondResponse = await promisify<any>(provider.sendAsync, provider)(payload); + const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(payload); expect(secondResponse.result).to.be.eq('0x00'); }); it('does not cache the result for latest transaction count', async () => { @@ -74,9 +74,9 @@ describe('NonceTrackerSubprovider', () => { const payload = { ...getTransactionCountPayload, params: ['0x0', 'latest'] }; - const response = await promisify<any>(provider.sendAsync, provider)(payload); + const response = await promisify<any>(provider.sendAsync.bind(provider))(payload); expect(response.result).to.be.eq('0x00'); - const secondResponse = await promisify<any>(provider.sendAsync, provider)(payload); + const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(payload); expect(secondResponse.result).to.be.eq('0x99'); }); it('clears the cache on a Nonce Too Low Error', async () => { @@ -103,14 +103,14 @@ describe('NonceTrackerSubprovider', () => { params: [transaction.serialize()], }; - const response = await promisify<any>(provider.sendAsync, provider)(noncePayload); + const response = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload); expect(response.result).to.be.eq('0x00'); - const secondResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload); + const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload); expect(secondResponse.result).to.be.eq('0x00'); try { - await promisify(provider.sendAsync, provider)(txPayload); + await promisify(provider.sendAsync.bind(provider))(txPayload); } catch (err) { - const thirdResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload); + const thirdResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload); expect(thirdResponse.result).to.be.eq('0x99'); } }); @@ -138,12 +138,12 @@ describe('NonceTrackerSubprovider', () => { params: [transaction.serialize()], }; - const response = await promisify<any>(provider.sendAsync, provider)(noncePayload); + const response = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload); expect(response.result).to.be.eq('0x00'); - const secondResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload); + const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload); expect(secondResponse.result).to.be.eq('0x00'); - await promisify(provider.sendAsync, provider)(txPayload); - const thirdResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload); + await promisify(provider.sendAsync.bind(provider))(txPayload); + const thirdResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload); expect(thirdResponse.result).to.be.eq('0x01'); }); }); |