Skip to content

Commit

Permalink
test: remove common.projectDir
Browse files Browse the repository at this point in the history
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: nodejs#17781
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Jon Moss <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Trott committed Dec 21, 2017
1 parent a4f44ac commit fc8e821
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>]

Expand Down
1 change: 0 additions & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion test/doctool/test-make-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down

0 comments on commit fc8e821

Please sign in to comment.