nhsuk/sexual-health-service-finder

Remove var from production code by switching to nock for testing Postcode.io

beseven opened this issue · 1 comments

Regarding the testing for postcodes.io requests:

I wonder if it would be clearer to use nock to mock the requests to the postcodes.io. Doing this would mean the fakes and spies could be removed and there would be no need to use var in the production code.

My preference would be to use nock as production code doesn't need to change.

Fixed in #115