core icon indicating copy to clipboard operation
core copied to clipboard

Mock endpoints during tests

Open bitpshr opened this issue 6 years ago • 1 comments

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

bitpshr avatar Jun 29 '18 11:06 bitpshr

Here are a list of controllers that have tests in which we need to mock network requests:

  • [ ] AssetsContractController
  • [ ] CollectiblesController
  • [ ] NetworkController
  • [ ] PhishingController
  • [ ] TransactionController

mcmire avatar Mar 14 '22 21:03 mcmire