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

Function runTest

test/parallel/test-uv-errno.js:33–56  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

31});
32
33function runTest(fn) {
34 ['test', {}, []].forEach((err) => {
35 assert.throws(
36 () => fn(err),
37 {
38 code: 'ERR_INVALID_ARG_TYPE',
39 name: 'TypeError',
40 message: 'The "err" argument must be of type number.' +
41 common.invalidArgTypeHelper(err)
42 });
43 });
44
45 [0, 1, Infinity, -Infinity, NaN].forEach((err) => {
46 assert.throws(
47 () => fn(err),
48 {
49 code: 'ERR_OUT_OF_RANGE',
50 name: 'RangeError',
51 message: 'The value of "err" is out of range. ' +
52 'It must be a negative integer. ' +
53 `Received ${err}`
54 });
55 });
56}
57
58runTest(_errnoException);
59runTest(getSystemErrorName);

Callers 3

test-uv-errno.jsFile · 0.70
processMessageFunction · 0.70

Calls 2

fnFunction · 0.70
forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…