mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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);
|
||
|
}
|