-
-
Save isaacs/de51aa6a1351ff68e844bc81ae908da2 to your computer and use it in GitHub Desktop.
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
const nock = require('nock') | |
const server = nock('http://localhost') | |
const CONTENT = 'this is fine' | |
server | |
.get('/test') | |
.times(1) | |
.reply(200, CONTENT) | |
const fetch = require('./') | |
fetch('http://localhost/test') | |
.then(() => fetch('http://localhost/test')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment