Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
vrolland committed Apr 6, 2020
1 parent 9f06c44 commit 6937687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,15 @@ describe('EtherchainProvider', () => {
// Test with each gas price type
await expect(
etherchainProvider.getGasPrice(StorageTypes.GasPriceType.SAFELOW),
).to.eventually.eql(
new bigNumber(1000000000),
);
).to.eventually.eql(new bigNumber(1000000000));

await expect(
etherchainProvider.getGasPrice(StorageTypes.GasPriceType.STANDARD),
).to.eventually.eql(
new bigNumber(3500000000),
);
).to.eventually.eql(new bigNumber(3500000000));

await expect(
etherchainProvider.getGasPrice(StorageTypes.GasPriceType.FAST),
).to.eventually.eql(
new bigNumber(7000000000),
);
).to.eventually.eql(new bigNumber(7000000000));
});

it('throws when API is not available', async () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/ethereum-storage/test/smartcontract-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,13 @@ describe('SmartContractManager', () => {
smartContractManager.eth.net.isListening = () =>
new Promise(
(resolve, _reject): void => {
setTimeout(() => resolve(true), 20000);
setTimeout(() => resolve(true), 300);
},
);

// Timeout is lower to not reach the mocha test timeout
await assert.isRejected(
smartContractManager.checkWeb3ProviderConnection(1000),
smartContractManager.checkWeb3ProviderConnection(100),
Error,
'The Web3 provider is not reachable, did you use the correct protocol (http/https)?',
);
Expand Down

0 comments on commit 6937687

Please sign in to comment.