nock.enableNetConnect() 11.7.2

node v10.24.1
version: 2.0.0
endpointsharetweet
const request = require('request') const nock = require('nock@11.7.2') nock.disableNetConnect(); nock.enableNetConnect({ test: host => !host.includes('example.com'), }); request({ url: 'https://example.com' }, (error) => { if (error) { console.error('error as expected', error); return; } console.log('this should not be logged') }) undefined;
Loading…

no comments

    sign in to comment