Skip to content

Commit 7322127

Browse files
richardlautargos
authored andcommittedApr 22, 2020
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 <riclau@uk.ibm.com> PR-URL: #32645 Refs: #32518 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1d563a6 commit 7322127

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)
Please sign in to comment.