1// Flags: --expose-internals 2'use strict'; 3 4// Check that if libuv reports a memory error on a DNS query, that the memory 5// error is passed through and not replaced with ENOTFOUND. 6 7require('../common'); 8 9const assert = require('assert'); 10const errors = require('internal/errors'); 11const { internalBinding } = require('internal/test/binding'); 12 13const { UV_EAI_MEMORY } = internalBinding('uv'); 14const memoryError = errors.dnsException(UV_EAI_MEMORY, 'fhqwhgads'); 15 16assert.strictEqual(memoryError.code, 'EAI_MEMORY'); 17