X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Ftest%2Ftap%2Fgit-cache-locking.js;fp=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Ftest%2Ftap%2Fgit-cache-locking.js;h=e08c96e1b765693d26625de386b02d171061fda0;hb=2529be6d456deeb07c128603ce4971f1dc29b695;hp=0000000000000000000000000000000000000000;hpb=2636fc31c16c23711cf2b06a4ae8537bba9c1d35;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/git-cache-locking.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/git-cache-locking.js new file mode 100644 index 00000000..e08c96e1 --- /dev/null +++ b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/git-cache-locking.js @@ -0,0 +1,46 @@ +var test = require('tap').test +var common = require('../common-tap') +var path = require('path') +var rimraf = require('rimraf') +var mkdirp = require('mkdirp') +var pkg = path.resolve(__dirname, 'git-cache-locking') +var tmp = path.join(pkg, 'tmp') +var cache = path.join(pkg, 'cache') + +test('setup', function (t) { + rimraf.sync(pkg) + mkdirp.sync(path.resolve(pkg, 'node_modules')) + t.end() +}) + +test('git-cache-locking: install a git dependency', function (t) { + // disable git integration tests on Travis. + if (process.env.TRAVIS) return t.end() + + // package c depends on a.git#master and b.git#master + // package b depends on a.git#master + common.npm([ + 'install', + 'git://github.com/nigelzor/npm-4503-c.git' + ], { + cwd: pkg, + env: { + npm_config_cache: cache, + npm_config_tmp: tmp, + npm_config_prefix: pkg, + npm_config_global: 'false', + HOME: process.env.HOME, + Path: process.env.PATH, + PATH: process.env.PATH + } + }, function (err, code, stdout, stderr) { + t.ifErr(err, 'npm install finished without error') + t.equal(0, code, 'npm install should succeed') + t.end() + }) +}) + +test('cleanup', function (t) { + rimraf.sync(pkg) + t.end() +})