From b39dcde056d21d855f7acbd73d8983006bdf0519 Mon Sep 17 00:00:00 2001 From: Daeyeon Jeong Date: Wed, 26 Oct 2022 09:35:28 +0900 Subject: [PATCH] test: remove a snapshot blob from test-inspect-address-in-use.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This removes a snapshot blob generated by `test/parallel/test-inspect-address-in-use.js`. Signed-off-by: Daeyeon Jeong PR-URL: https://github.com/nodejs/node/pull/45132 Fixes: https://github.com/nodejs/node/issues/45017 Reviewed-By: Colin Ihrig Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: Joyee Cheung Reviewed-By: Chengzhong Wu Reviewed-By: James M Snell Reviewed-By: Michaël Zasso Reviewed-By: Juan José Arboleda --- test/parallel/test-inspect-address-in-use.js | 11 ++++++++--- 1 file 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 a5b2d98537dfe4..eb076b21c9beaa 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);