Skip to content

Commit ed89863

Browse files
richardlautargos
authored andcommitted
test: fix tool path in test-doctool-versions.js
Path to the versions tool tested by test-doctool-versions.js would be incorrect if the test temporary directory was redirected (e.g. via NODE_TEST_DIR) outside of `test/`. Signed-off-by: Richard Lau <[email protected]> PR-URL: #32645 Refs: #32518 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent ba0ea79 commit ed89863

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/doctool/test-doctool-versions.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const tmpdir = require('../common/tmpdir');
99
const util = require('util');
1010

1111
const debuglog = util.debuglog('test');
12-
const versionsTool = path.join('../../tools/doc/versions.js');
12+
const versionsTool = path.resolve(__dirname, '../../tools/doc/versions.js');
1313

1414
// At the time of writing these are the minimum expected versions.
1515
// New versions of Node.js do not have to be explicitly added here.
@@ -29,7 +29,7 @@ const expected = [
2929

3030
tmpdir.refresh();
3131
const versionsFile = path.join(tmpdir.path, 'versions.json');
32-
debuglog(versionsFile);
32+
debuglog(`${process.execPath} ${versionsTool} ${versionsFile}`);
3333
const opts = { cwd: tmpdir.path, encoding: 'utf8' };
3434
const cp = spawnSync(process.execPath, [ versionsTool, versionsFile ], opts);
3535
debuglog(cp.stderr);

0 commit comments

Comments
 (0)