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: #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>
  • Loading branch information
Trott authored and targos committed Mar 24, 2018
1 parent fd8523f commit a8d9ccf
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 @@ -353,11 +353,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 @@ -65,7 +65,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 a8d9ccf

Please sign in to comment.