// deno-fmt-ignore-file // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. // Taken from Node 23.9.0 // This file is automatically generated by `tests/node_compat/runner/setup.ts`. Do not modify this file manually. 'use strict'; require('../common'); const assert = require('assert'); const buffer = require('buffer'); const rangeErrorObjs = [NaN, -1]; const typeErrorObj = 'and even this'; for (const obj of rangeErrorObjs) { assert.throws( () => buffer.INSPECT_MAX_BYTES = obj, { code: 'ERR_OUT_OF_RANGE', name: 'RangeError', } ); assert.throws( () => buffer.INSPECT_MAX_BYTES = obj, { code: 'ERR_OUT_OF_RANGE', name: 'RangeError', } ); } assert.throws( () => buffer.INSPECT_MAX_BYTES = typeErrorObj, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', } );