diff options
Diffstat (limited to 'deps/npm/test/tap/no-global-warns.js')
-rw-r--r-- | deps/npm/test/tap/no-global-warns.js | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/deps/npm/test/tap/no-global-warns.js b/deps/npm/test/tap/no-global-warns.js index 538ab8b359..1c39fd7954 100644 --- a/deps/npm/test/tap/no-global-warns.js +++ b/deps/npm/test/tap/no-global-warns.js @@ -2,8 +2,6 @@ var path = require('path') var test = require('tap').test var mkdirp = require('mkdirp') -var osenv = require('osenv') -var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') @@ -38,7 +36,13 @@ var installJSON = { } test('setup', function (t) { - setup() + mkdirp.sync(mockGlobal) + mkdirp.sync(toInstall) + writeFileSync( + path.join(toInstall, 'package.json'), + JSON.stringify(installJSON, null, 2) + ) + writeFileSync(configPath, config) t.end() }) @@ -59,24 +63,3 @@ test('no-global-warns', function (t) { t.end() }) }) - -test('cleanup', function (t) { - process.chdir(osenv.tmpdir()) - cleanup() - t.end() -}) - -function cleanup () { - rimraf.sync(base) -} - -function setup () { - cleanup() - mkdirp.sync(mockGlobal) - mkdirp.sync(toInstall) - writeFileSync( - path.join(toInstall, 'package.json'), - JSON.stringify(installJSON, null, 2) - ) - writeFileSync(configPath, config) -} |