Closed simlu closed 4 years ago
Consider using nockBack for e2e test.
Sounds great! I agree that this will make the E2E tests more meaningful and reliable.
Keep in mind that we will have to use the lodash/matches
variant when matching the request.
We a very convenient wrapper for mocha called node-tdd.
I'm not really a fan of mocha, sorry. I think we can use tape-nock
though.
No external requests should ever be made when test are run as part of a suite
The HAFAS APIs change so often that it still makes sense to have an "isolated" CI run that checks if they still match. Sort of like a monitoring system.
Consider using nockBack for e2e test. We a very convenient wrapper for mocha called node-tdd.
The way this would work:
This is a solid approach when dealing with external APIs and considered best practice.