2 var test = require('tap').test
3 var common = require('../common-tap.js')
4 var path = require('path')
5 var rimraf = require('rimraf')
6 var mkdirp = require('mkdirp')
7 var basepath = path.resolve(__dirname, path.basename(__filename, '.js'))
8 var fixturepath = path.resolve(basepath, 'npm-test-private')
9 var modulepath = path.resolve(basepath, 'node_modules')
10 var Tacks = require('tacks')
14 var fixture = new Tacks(
19 'package.json': File({
20 name: 'npm-test-private',
22 homepage: 'http://www.youtube.com/watch?v=1MLry6Cn_D4',
28 test('setup', function (t) {
33 test('private', function (t) {
34 common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest)
35 function installCheckAndTest (err, code, stdout, stderr) {
39 t.is(code, 0, 'install went ok')
44 test('cleanup', function (t) {
51 fixture.create(fixturepath)
52 mkdirp.sync(modulepath)
56 fixture.remove(fixturepath)