If I do:
nock('http://localhost:3000').get('/test').reply(200);
And then try:
fetch('http://localhost:3000').then(console.log);
I get a "No match for request" error message.
The only way I can get this to work is by using a catch-all regex:
nock(/./).get('/test').reply(200);
Based on these instructions, it really seems as though the first should work as well.
Any idea what I'm missing?
Aucun commentaire:
Enregistrer un commentaire