Skip to content

Commit 5829b8f

Browse files
joyeecheungtargos
authored andcommitted
test: add common.projectDir
Implement common.projectDir which points to the project directory. PR-URL: #16208 Fixes: nodejs/build#887 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 0a52479 commit 5829b8f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/common/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ original state after calling [`common.hijackStdOut()`][].
337337

338338
Path to the 'root' directory. either `/` or `c:\\` (windows)
339339

340+
### projectDir
341+
* return [&lt;String>]
342+
343+
Path to the project directory.
344+
340345
### skip(msg)
341346
* `msg` [&lt;String>]
342347

test/common/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ exports.enoughTestCpu = Array.isArray(cpus) &&
5959
(cpus.length > 1 || cpus[0].speed > 999);
6060

6161
exports.rootDir = exports.isWindows ? 'c:\\' : '/';
62+
exports.projectDir = path.resolve(__dirname, '..', '..');
63+
6264
exports.buildType = process.config.target_defaults.default_configuration;
6365

6466
// If env var is set then enable async_hook hooks for all tests.

0 commit comments

Comments
 (0)