There's a wise afterEach assertion that runs after every test to ensure that no nock request mocks are left over. If you're working on tests which use nock, it can be annoying though, because you need to figure out which mock is not being hit to fix the test. Instead of just asserting that there are no mocks, we can use an assertion of the list of mocks to show the developer what mocks are still hanging around with mocha's nice diff.
Coverage remained the same at 100.0% when pulling b670d8b1cf72ed533d9873b49866e71f4461ce39 on gadget-inc:clearer-pending-mock-assertion into 0afb707d7f9b6163b91acb1d483f4398eed71074 on MONEI:master.
There's a wise afterEach assertion that runs after every test to ensure that no nock request mocks are left over. If you're working on tests which use nock, it can be annoying though, because you need to figure out which mock is not being hit to fix the test. Instead of just asserting that there are no mocks, we can use an assertion of the list of mocks to show the developer what mocks are still hanging around with mocha's nice diff.