Skip to content

Instantly share code, notes, and snippets.

@nfroidure
Last active August 5, 2019 08:11
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 nfroidure/6e54491bb243f0503cfe to your computer and use it in GitHub Desktop.
Save nfroidure/6e54491bb243f0503cfe to your computer and use it in GitHub Desktop.
Snippet to record HTTP traffic
import fs from 'fs';
import nock from 'nock';
nock.recorder.rec({
logging: content => fs.appendFileSync('./nock-records.log', content),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment