Skip to content
Permalink
Browse files

test: chdir before running test-cli-node-options

When test-cli-node-options is run it uses the --trace-events-enabled
option which generates a file named node_trace.1.log. This commit
changes the working directory to the test tmp directory to avoid this
file being created in the project root.

PR-URL: #12660
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
danbev committed Apr 26, 2017
1 parent 7632761 commit a4fd9e5e6d43028b33b8ff5c1bea3b4998573d5a
Showing with 3 additions and 0 deletions.
  1. +3 −0 test/parallel/test-cli-node-options.js
@@ -8,6 +8,9 @@ if (process.config.variables.node_without_node_options)
const assert = require('assert');
const exec = require('child_process').execFile;

common.refreshTmpDir();
process.chdir(common.tmpDir);

disallow('--version');
disallow('-v');
disallow('--help');

0 comments on commit a4fd9e5

Please sign in to comment.
You can’t perform that action at this time.