diff options
author | Rebecca Turner <me@re-becca.org> | 2017-05-25 13:07:28 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:30 +0300 |
commit | 3116cfecdaaf3b76abe44ae1e3e08cce8bf8cfe1 (patch) | |
tree | 57d2419d95de04152fd4d9413ac9f673490511e4 /test/tap/uninstall-link-clean.js | |
parent | f17f4e6e50ebf315018b812e081e56356d45ba75 (diff) |
install: Make removing packages work w/o package.json
Diffstat (limited to 'test/tap/uninstall-link-clean.js')
-rw-r--r-- | test/tap/uninstall-link-clean.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/tap/uninstall-link-clean.js b/test/tap/uninstall-link-clean.js index b4759e889..2b1d244d0 100644 --- a/test/tap/uninstall-link-clean.js +++ b/test/tap/uninstall-link-clean.js @@ -3,15 +3,15 @@ var path = require('path') var existsSync = fs.existsSync || path.existsSync var mkdirp = require('mkdirp') -var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'uninstall-link-clean') -var dep = path.join(__dirname, 'dep') -var work = path.join(__dirname, 'uninstall-link-clean-TEST') +var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = path.join(testdir, 'pkg') +var dep = path.join(testdir, 'dep') +var work = path.join(testdir, 'uninstall-link-clean-TEST') var modules = path.join(work, 'node_modules') var EXEC_OPTS = { cwd: work, stdio: [0, 'ignore', 2] } @@ -54,7 +54,6 @@ test('setup', function (t) { fs.writeFileSync(path.join(dep, 'world.js'), world) mkdirp.sync(modules) - process.chdir(work) t.end() }) @@ -110,8 +109,5 @@ test('cleanup', function (t) { }) function cleanup () { - process.chdir(osenv.tmpdir()) - rimraf.sync(dep) - rimraf.sync(work) - rimraf.sync(pkg) + rimraf.sync(testdir) } |