Sha256: 2c783410f150a37c64019a7b682fa416b2bcaa4e1a9a1f62d145a4fd2a0319f4
Contents?: true
Size: 1.26 KB
Versions: 5
Compression:
Stored size: 1.26 KB
Contents
'use strict' var test = require('tap').test var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) var fixturepath = path.resolve(basepath, 'npm-test-private') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var fixture = new Tacks( Dir({ README: File( 'just an npm test\n' ), 'package.json': File({ name: 'npm-test-private', version: '9.9.9-9', homepage: 'http://www.youtube.com/watch?v=1MLry6Cn_D4', private: 'true' }) }) ) test('setup', function (t) { setup() t.done() }) test('private', function (t) { common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest) function installCheckAndTest (err, code, stdout, stderr) { if (err) throw err console.error(stderr) console.log(stdout) t.is(code, 0, 'install went ok') t.done() } }) test('cleanup', function (t) { cleanup() t.done() }) function setup () { cleanup() fixture.create(fixturepath) mkdirp.sync(modulepath) } function cleanup () { fixture.remove(fixturepath) rimraf.sync(basepath) }
Version data entries
5 entries across 4 versions & 1 rubygems