News for hackers. Stuff that matters.
Re:API end to end testing with Docker by MuffinFlavored on Monday November 11, 2019 @07:51PM (#21510484)
I would go with `nock` rather than spinning up a mock server: https://github.com/nock/nock
Re:API end to end testing with Docker by jpdel on Tuesday November 12, 2019 @01:21AM (#21511945)
nock will intercept http requests in the same node process it is used in. Here the test (and the mock) are in a different container and thus process. It won't catch them. Unless it is possible to actually spin up a server using nock and I've missed it? In which case I agree, custom code is not needed.