test: remove common.projectDir
common.projectDir is used in one test, so it's not so common. Remove from common module to the one test file that needs it. PR-URL: https://github.com/nodejs/node/pull/17781 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
a4f44acd69
commit
fc8e8215f6
@ -340,11 +340,6 @@ original state after calling [`common.hijackStdOut()`][].
|
||||
|
||||
Path to the 'root' directory. either `/` or `c:\\` (windows)
|
||||
|
||||
### projectDir
|
||||
* [<String>]
|
||||
|
||||
Path to the project directory.
|
||||
|
||||
### skip(msg)
|
||||
* `msg` [<String>]
|
||||
|
||||
|
@ -69,7 +69,6 @@ exports.enoughTestCpu = Array.isArray(cpus) &&
|
||||
(cpus.length > 1 || cpus[0].speed > 999);
|
||||
|
||||
exports.rootDir = exports.isWindows ? 'c:\\' : '/';
|
||||
exports.projectDir = path.resolve(__dirname, '..', '..');
|
||||
|
||||
exports.buildType = process.config.target_defaults.default_configuration;
|
||||
|
||||
|
@ -11,7 +11,7 @@ const assert = require('assert');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const apiPath = path.resolve(common.projectDir, 'out', 'doc', 'api');
|
||||
const apiPath = path.resolve(__dirname, '..', '..', 'out', 'doc', 'api');
|
||||
const docs = fs.readdirSync(apiPath);
|
||||
assert.ok(docs.includes('_toc.html'));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user