jest complains when using web3.eth - open handle error

Viewed 105

I'm getting the following error:

Jest has detected the following 1 open handle potentially keeping Jest from exiting:

When executing a simple test like this

        var currentProvider = new Web3.providers.HttpProvider('https://ropsten.infura.io/v3/XXXXXXXXX');
        var web3 = new Web3(currentProvider);

        const info = await web3.eth.getBlock('latest')
        expect(info.gasLimit).toBeGreaterThan(0)

The error points to getBlock

const info = await web3.eth.getBlock('latest')

I'm not understanding what problem is \ how to handle this?

0 Answers
Related