1// Flags: --expose-internals 2'use strict'; 3 4require('../common'); 5const assert = require('assert'); 6const { 7 getSystemErrorMap, 8 _errnoException 9} = require('util'); 10 11const { internalBinding } = require('internal/test/binding'); 12const uv = internalBinding('uv'); 13const uvKeys = Object.keys(uv); 14 15const errMap = getSystemErrorMap(); 16 17uvKeys.forEach((key) => { 18 if (!key.startsWith('UV_')) 19 return; 20 21 const err = _errnoException(uv[key]); 22 const name = uv.errname(uv[key]); 23 assert.strictEqual(errMap.get(err.errno)[0], name); 24}); 25