From fc8e8215f659043bd91c398a516a727e3d662f1b Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 19 Dec 2017 21:51:45 -0800 Subject: [PATCH] test: remove common.projectDir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Gireesh Punathil Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Timothy Gu Reviewed-By: Jon Moss Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- test/common/README.md | 5 ----- test/common/index.js | 1 - test/doctool/test-make-doc.js | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/test/common/README.md b/test/common/README.md index b87976f1243d24..39b368ae209189 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -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>] diff --git a/test/common/index.js b/test/common/index.js index 57a09cf69f3a3d..b67b2f7b71175a 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -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; diff --git a/test/doctool/test-make-doc.js b/test/doctool/test-make-doc.js index ad372d7121283d..74845b24446fc6 100644 --- a/test/doctool/test-make-doc.js +++ b/test/doctool/test-make-doc.js @@ -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'));