As a continuation of #1404, note that there are several TODO-coverage comments in lib/recorder.js which are paired with istanbul ignores.
We'd like to clean these up. With 100% test coverage, the tests take on a life of their own in maintaining the project, and will allow us to refactor – and add functionality – with confidence.
Anyone is welcome to pick up this work! Feel free to post here first to avoid duplicating work 😀
One bit of guidance (copied from #1404): our test strategy is to avoid narrow-bracket tests, and instead aim to keep writing high-level functional tests (i.e. via calls to nock()). If there is not a way to exercise the code through the public nock API, it may be dead code. In the case of dead code, it's better to remove it than to add tests.
As a continuation of #1404, note that there are several
TODO-coveragecomments inlib/recorder.jswhich are paired with istanbul ignores.We'd like to clean these up. With 100% test coverage, the tests take on a life of their own in maintaining the project, and will allow us to refactor – and add functionality – with confidence.
Anyone is welcome to pick up this work! Feel free to post here first to avoid duplicating work 😀
One bit of guidance (copied from #1404): our test strategy is to avoid narrow-bracket tests, and instead aim to keep writing high-level functional tests (i.e. via calls to
nock()). If there is not a way to exercise the code through the publicnockAPI, it may be dead code. In the case of dead code, it's better to remove it than to add tests.