diff --git a/tools/test-npm.sh b/tools/test-npm.sh index 62929ee8ccc94f..47b64c9ea089b0 100755 --- a/tools/test-npm.sh +++ b/tools/test-npm.sh @@ -29,10 +29,10 @@ export npm_config_prefix="npm-prefix" export npm_config_tmp="npm-tmp" # install npm devDependencies and run npm's tests - -../$NODE cli.js install --ignore-scripts -../$NODE cli.js run-script test-legacy -../$NODE cli.js run-script test +NODEPATH="$(../$NODE -p 'require("path").resolve("..")')" +PATH="$NODEPATH:$PATH" ../$NODE cli.js install --ignore-scripts +PATH="$NODEPATH:$PATH" ../$NODE test/run.js +PATH="$NODEPATH:$PATH" ../$NODE cli.js run-script tap -- "test/tap/*.js" # clean up everything one single shot cd .. && rm -rf test-npm