mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
a165193c5c
PR-URL: https://github.com/nodejs/node/pull/44520 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
20 lines
514 B
JavaScript
20 lines
514 B
JavaScript
'use strict';
|
|
|
|
const assert = require('node:assert');
|
|
|
|
const { expectedPort, expectedInitialPort, expectedHost } = process.env;
|
|
const debugOptions =
|
|
require('internal/options').getOptionValue('--inspect-port');
|
|
|
|
if ('expectedPort' in process.env) {
|
|
assert.strictEqual(process.debugPort, +expectedPort);
|
|
}
|
|
|
|
if ('expectedInitialPort' in process.env) {
|
|
assert.strictEqual(debugOptions.port, +expectedInitialPort);
|
|
}
|
|
|
|
if ('expectedHost' in process.env) {
|
|
assert.strictEqual(debugOptions.host, expectedHost);
|
|
}
|