Skip to content

Instantly share code, notes, and snippets.

@neverendingqs
Last active August 17, 2018 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neverendingqs/42d5260a5acb537d774d993b977bcd8d to your computer and use it in GitHub Desktop.
Save neverendingqs/42d5260a5acb537d774d993b977bcd8d to your computer and use it in GitHub Desktop.
2017/03/13/ensure-all-nock-interceptors-are-used.html - summary.js
// Example for mocha; translate as needed for your favourite test framework
afterEach(function() {
...
if(!nock.isDone()) {
this.test.error(new Error('Not all nock interceptors were used!'));
nock.cleanAll();
}
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment