summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/install-property-conflicts.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/install-property-conflicts.js')
-rw-r--r--deps/npm/test/tap/install-property-conflicts.js33
1 files changed, 6 insertions, 27 deletions
diff --git a/deps/npm/test/tap/install-property-conflicts.js b/deps/npm/test/tap/install-property-conflicts.js
index c8f58e139f..a98f8570c6 100644
--- a/deps/npm/test/tap/install-property-conflicts.js
+++ b/deps/npm/test/tap/install-property-conflicts.js
@@ -1,9 +1,7 @@
var fs = require('fs')
var resolve = require('path').resolve
-var osenv = require('osenv')
var mkdirp = require('mkdirp')
-var rimraf = require('rimraf')
var test = require('tap').test
var common = require('../common-tap.js')
@@ -22,8 +20,12 @@ var json = {
}
test('setup', function (t) {
- setup()
- t.pass('setup ran')
+ // make sure it installs locally
+ mkdirp.sync(resolve(target, 'node_modules'))
+ fs.writeFileSync(
+ resolve(pkg, 'package.json'),
+ JSON.stringify(json, null, 2) + '\n'
+ )
t.end()
})
@@ -49,26 +51,3 @@ test('install package with a `type` property', function (t) {
}
)
})
-
-test('clean', function (t) {
- cleanup()
- t.pass('cleaned up')
- t.end()
-})
-
-function setup () {
- cleanup()
- mkdirp.sync(pkg)
- // make sure it installs locally
- mkdirp.sync(resolve(target, 'node_modules'))
- fs.writeFileSync(
- resolve(pkg, 'package.json'),
- JSON.stringify(json, null, 2) + '\n'
- )
-}
-
-function cleanup () {
- process.chdir(osenv.tmpdir())
- rimraf.sync(pkg)
- rimraf.sync(target)
-}