1 var fs = require('graceful-fs')
2 var path = require('path')
4 var mkdirp = require('mkdirp')
5 var mr = require('npm-registry-mock')
6 var rimraf = require('rimraf')
7 var test = require('tap').test
9 var common = require('../common-tap.js')
10 var npm = require('../../')
13 var pkg = path.resolve(__dirname, 'outdated-long')
14 var cache = path.resolve(pkg, 'cache')
17 name: 'outdated-long',
18 description: 'fixture',
25 test('setup', function (t) {
29 path.join(pkg, 'package.json'),
30 JSON.stringify(json, null, 2)
37 test('it should not throw', function (t) {
38 var originalLog = console.log
42 path.resolve(pkg, 'node_modules', 'underscore'),
43 path.resolve(pkg, 'node_modules', 'underscore') +
62 console.log = function () {
63 output.push.apply(output, arguments)
65 mr({ port: common.port }, function (er, s) {
71 registry: common.registry
74 npm.install('.', function (err) {
75 t.ifError(err, 'install success')
76 npm.config.set('long', true)
77 npm.outdated(function (er, d) {
78 t.ifError(er, 'outdated success')
80 console.log = originalLog
82 t.same(output, expOut)
94 test('cleanup', function (t) {