MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
945 stars 278 forks source link

chore: use a more revealing assertion for leftover nock mocks #542

Closed airhorns closed 2 years ago

airhorns commented 2 years ago

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.

coveralls commented 2 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling b670d8b1cf72ed533d9873b49866e71f4461ce39 on gadget-inc:clearer-pending-mock-assertion into 0afb707d7f9b6163b91acb1d483f4398eed71074 on MONEI:master.

lpinca commented 2 years ago

Thank you.