summaryrefslogtreecommitdiff
path: root/test/parallel/test-inspect-address-in-use.js
diff options
context:
space:
mode:
authorDaeyeon Jeong <daeyeon.dev@gmail.com>2022-10-26 09:35:28 +0900
committerGitHub <noreply@github.com>2022-10-26 00:35:28 +0000
commit0a7ba84335e5f8bb47e56a56aa66e411616396cb (patch)
tree3de570cdcfe4b9c2e121ce89e7cc5a94d8f5f784 /test/parallel/test-inspect-address-in-use.js
parentefd3c9cd31b746a3c8728b12f4d894e39ce6d10b (diff)
downloadnode-new-0a7ba84335e5f8bb47e56a56aa66e411616396cb.tar.gz
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 <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/45132 Fixes: https://github.com/nodejs/node/issues/45017 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Diffstat (limited to 'test/parallel/test-inspect-address-in-use.js')
-rw-r--r--test/parallel/test-inspect-address-in-use.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/parallel/test-inspect-address-in-use.js b/test/parallel/test-inspect-address-in-use.js
index a5b2d98537..eb076b21c9 100644
--- a/test/parallel/test-inspect-address-in-use.js
+++ b/test/parallel/test-inspect-address-in-use.js
@@ -5,6 +5,7 @@ common.skipIfInspectorDisabled();
const { spawnSync } = require('child_process');
const { createServer } = require('http');
const assert = require('assert');
+const tmpdir = require('../common/tmpdir');
const fixtures = require('../common/fixtures');
const entry = fixtures.path('empty.js');
const { Worker } = require('worker_threads');
@@ -21,10 +22,10 @@ function testOnServerListen(fn) {
server.listen(0, '127.0.0.1');
}
-function testChildProcess(getArgs, exitCode) {
+function testChildProcess(getArgs, exitCode, options) {
testOnServerListen((server) => {
const { port } = server.address();
- const child = spawnSync(process.execPath, getArgs(port));
+ const child = spawnSync(process.execPath, getArgs(port), options);
const stderr = child.stderr.toString().trim();
const stdout = child.stdout.toString().trim();
console.log('[STDERR]');
@@ -40,8 +41,12 @@ function testChildProcess(getArgs, exitCode) {
});
}
+tmpdir.refresh();
+
testChildProcess(
- (port) => [`--inspect=${port}`, '--build-snapshot', entry], 0);
+ (port) => [`--inspect=${port}`, '--build-snapshot', entry], 0,
+ { cwd: tmpdir.path });
+
testChildProcess(
(port) => [`--inspect=${port}`, entry], 0);