Web3-eth-contract tests update/fixes
--forceExit flag should be removed from the web3-eth-contract tests test:integration
I’m trying to understand the reasoning behind this issue. As I see it, the --forceExit flag is used in tests that rely on a WebSocket provider because the test runner doesn’t exit properly due to hanging socket connections. This could potentially be solved by closing the connection correctly with web3.currentProvider.disconnect().
In the web3-eth-contract package, the integration tests are run by default using the HTTP provider. However, some tests are conditional and only execute with a WebSocket provider. When using the HTTP provider, you’ll notice that 15 tests are skipped.
I’m looking for more context to understand whether I should focus on enabling the WebSocket tests, ensuring proper connection closure, or if there’s a larger issue that I’m missing. Could you please clarify the intended approach?
related PR: https://github.com/web3/web3.js/pull/7162