Skip to content

Commit b39dcde

Browse files
daeyeonRafaelGSS
authored andcommitted
test: remove a snapshot blob from test-inspect-address-in-use.js
This removes a snapshot blob generated by `test/parallel/test-inspect-address-in-use.js`. Signed-off-by: Daeyeon Jeong <[email protected]> PR-URL: #45132 Fixes: #45017 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent 3a26347 commit b39dcde

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/parallel/test-inspect-address-in-use.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ common.skipIfInspectorDisabled();
55
const { spawnSync } = require('child_process');
66
const { createServer } = require('http');
77
const assert = require('assert');
8+
const tmpdir = require('../common/tmpdir');
89
const fixtures = require('../common/fixtures');
910
const entry = fixtures.path('empty.js');
1011
const { Worker } = require('worker_threads');
@@ -21,10 +22,10 @@ function testOnServerListen(fn) {
2122
server.listen(0, '127.0.0.1');
2223
}
2324

24-
function testChildProcess(getArgs, exitCode) {
25+
function testChildProcess(getArgs, exitCode, options) {
2526
testOnServerListen((server) => {
2627
const { port } = server.address();
27-
const child = spawnSync(process.execPath, getArgs(port));
28+
const child = spawnSync(process.execPath, getArgs(port), options);
2829
const stderr = child.stderr.toString().trim();
2930
const stdout = child.stdout.toString().trim();
3031
console.log('[STDERR]');
@@ -40,8 +41,12 @@ function testChildProcess(getArgs, exitCode) {
4041
});
4142
}
4243

44+
tmpdir.refresh();
45+
4346
testChildProcess(
44-
(port) => [`--inspect=${port}`, '--build-snapshot', entry], 0);
47+
(port) => [`--inspect=${port}`, '--build-snapshot', entry], 0,
48+
{ cwd: tmpdir.path });
49+
4550
testChildProcess(
4651
(port) => [`--inspect=${port}`, entry], 0);
4752

0 commit comments

Comments
 (0)