1 var test = require('tap').test
2 var common = require('../common-tap')
3 var path = require('path')
4 var rimraf = require('rimraf')
5 var mkdirp = require('mkdirp')
6 var pkg = path.resolve(__dirname, 'git-cache-locking')
7 var tmp = path.join(pkg, 'tmp')
8 var cache = path.join(pkg, 'cache')
10 test('setup', function (t) {
12 mkdirp.sync(path.resolve(pkg, 'node_modules'))
16 test('git-cache-locking: install a git dependency', function (t) {
17 // disable git integration tests on Travis.
18 if (process.env.TRAVIS) return t.end()
20 // package c depends on a.git#master and b.git#master
21 // package b depends on a.git#master
24 'git://github.com/nigelzor/npm-4503-c.git'
28 npm_config_cache: cache,
30 npm_config_prefix: pkg,
31 npm_config_global: 'false',
32 HOME: process.env.HOME,
33 Path: process.env.PATH,
34 PATH: process.env.PATH
36 }, function (err, code, stdout, stderr) {
37 t.ifErr(err, 'npm install finished without error')
38 t.equal(0, code, 'npm install should succeed')
43 test('cleanup', function (t) {