MCPcopy Index your code
hub / github.com/nodejs/node / test

Function test

test/parallel/test-http-invalid-urls.js:16–29  ·  view source on GitHub ↗
(host)

Source from the content-addressed store, hash-verified

14}
15
16function test(host) {
17 ['get', 'request'].forEach((fn) => {
18 Object.keys(modules).forEach((module) => {
19 const doNotCall = common.mustNotCall(
20 `${module}.${fn} should not connect to ${host}`
21 );
22 const throws = () => { modules[module][fn](host, doNotCall); };
23 assert.throws(throws, {
24 name: 'TypeError',
25 code: 'ERR_INVALID_URL'
26 });
27 });
28 });
29}
30
31['www.nodejs.org', 'localhost', '127.0.0.1', 'http://:80/'].forEach(test);

Callers

nothing calls this directly

Calls 2

forEachMethod · 0.65
keysMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…