The current tests for the service and btc libs are highly dependent on networking conditions (e.g., BtcAssetsApi service status, blockchain status, internet connectivity), which could lead to unexpected results when, for example, the client's internet connection is unstable.
The current tests for the
service
andbtc
libs are highly dependent on networking conditions (e.g., BtcAssetsApi service status, blockchain status, internet connectivity), which could lead to unexpected results when, for example, the client's internet connection is unstable.To improve, we can refactor the tests with the mocking feature provided by vitest: https://vitest.dev/guide/mocking