Last active
August 5, 2019 08:11
-
-
Save nfroidure/6e54491bb243f0503cfe to your computer and use it in GitHub Desktop.
Snippet to record HTTP traffic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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