core
core copied to clipboard
Mock endpoints during tests
The current test suite doesn't mock any endpoints during unit testing. Instead, they either hit real endpoints or skip request entirely. We should be setting nock.disableNetConnect();
in the unit test setup to ensure that none of our tests will send real network requests, but first we'll have to migrate each test that relies upon the network to use mocks.
EDITED TO ADD:
Here are a list of controllers that have tests in which we need to mock network requests:
- [ ] #770
- [ ] #769
- [ ] #771
- [x] #772
- [ ] #773
Here are a list of controllers that have tests in which we need to mock network requests:
- [ ] AssetsContractController
- [ ] CollectiblesController
- [ ] NetworkController
- [ ] PhishingController
- [ ] TransactionController