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-platform-all')
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-platform-all',
22 homepage: 'http://www.zombo.com/',
45 test('setup', function (t) {
50 test('platform-all', function (t) {
51 common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest)
52 function installCheckAndTest (err, code, stdout, stderr) {
54 t.is(stderr, '', 'no error messages')
55 t.is(code, 0, 'install went ok')
60 test('cleanup', function (t) {
67 fixture.create(fixturepath)
68 mkdirp.sync(modulepath)
71 fixture.remove(fixturepath)