pokt-network / pocket-js-web3-provider

Pocket JavaScript Web3-Provider
MIT License
3 stars 1 forks source link

Initial unit test will falsely pass with a race condition #33

Closed nymd closed 3 years ago

nymd commented 4 years ago

it('should create a new instance of the PocketProvider', async () => { expect( async () => { PocketAAT.from(version, clientPubKey, appPubKeyHex, appPrivKeyHex).then(function (pocketAAT) { const pocketProvider = new PocketProvider(blockchain, pocketAAT, pocket) console.log(pocketAAT) }) }).to.not.throw(Error) })

This will falsely pass due to a race condition with the PocketProvider not throwing the error in time.

nymd commented 4 years ago

in tests/src/eth.js