1'use strict'; 2 3// Regression test for an integer overflow in inspector.open() when the port 4// exceeds the range of an unsigned 16-bit integer. 5 6const common = require('../common'); 7common.skipIfInspectorDisabled(); 8common.skipIfWorker(); 9 10const assert = require('assert'); 11const inspector = require('inspector'); 12 13assert.throws(() => inspector.open(99999), { 14 name: 'RangeError', 15 code: 'ERR_OUT_OF_RANGE', 16 message: 'The value of "port" is out of range. It must be >= 0 && <= 65535. Received 99999' 17}); 18