nock/nock#1076

node v8.17.0
version: 1.0.0
endpointsharetweet
Test case for https://github.com/node-nock/nock/issues/1076
const nock922 = require('nock@9.2.2') const got = require('got') nock922(/localhost/, {allowUnmocked: true}) .get('/no/regex/here') .reply(200, 'Match regex'); try { await got('http://localhost:3000/no/regex/here'); console.log('nock@9.2.2 is ok') } catch (error) { console.log('nock@9.2.2 is not ok') }
const nock921 = require('nock@9.2.1') nock921(/localhost/, {allowUnmocked: true}) .get('/no/regex/here') .reply(200, 'Match regex'); try { await got('http://localhost:3000/no/regex/here'); console.log('nock@9.2.1 is ok') } catch (error) { console.log('nock@9.2.1 is not ok') }
Loading…

no comments

    sign in to comment