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:
Rich Trott 2017-12-19 21:51:45 -08:00
parent a4f44acd69
commit fc8e8215f6
3 changed files with 1 additions and 7 deletions

View File

@ -340,11 +340,6 @@ original state after calling [`common.hijackStdOut()`][].
Path to the 'root' directory. either `/` or `c:\\` (windows)
### projectDir
* [&lt;String>]
Path to the project directory.
### skip(msg)
* `msg` [&lt;String>]

View File

@ -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;

View File

@ -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'));