var common = require("../common-tap.js")
var fs = require("fs")
var test = require("tap").test
var rimraf = require("rimraf")
var npm = require("../../")

var mr = require("npm-registry-mock")
// config
var pkg = __dirname + '/outdated'

test("it should not throw", function (t) {
  cleanup()
  process.chdir(pkg)

  mr(common.port, function (s) {
    npm.load({
      cache: pkg + "/cache",
      loglevel: 'silent',
      registry: common.registry }
    , function () {
      npm.install(".", function (err) {
        npm.outdated(function (er, d) {
          console.log(d)
          s.close()
          t.end()
        })
      })
    })
  })
})

test("cleanup", function (t) {
  cleanup()
  t.end()
})

function cleanup () {
  rimraf.sync(pkg + "/node_modules")
  rimraf.sync(pkg + "/cache")
}

@@ -231,16 +231,44 @@
 dated'%0A%0A
+var path = require(%22path%22)%0A%0A
 test(%22it
@@ -336,16 +336,614 @@
 r(pkg)%0A%0A
+  var originalLog = console.log%0A  var output = %5B%5D%0A  var expOut = %5B path.resolve(__dirname, %22outdated/node_modules/underscore%22)%0A               , path.resolve(__dirname, %22outdated/node_modules/underscore%22)%0A               + %22:underscore@1.3.1%22%0A               + %22:underscore@1.3.1%22%0A               + %22:underscore@1.5.1%22 %5D%0A  var expData = %5B %5B path.resolve(__dirname, %22outdated%22)%0A                  , %22underscore%22%0A                  , %221.3.1%22%0A                  , %221.3.1%22%0A                  , %221.5.1%22%0A                  , %221.3.1%22 %5D %5D%0A%0A  console.log = function () %7B%0A    output.push.apply(output, arguments)%0A  %7D%0A
   mr(com
@@ -1037,16 +1037,39 @@
 ilent',%0A
+      parseable: true,%0A
       re
@@ -1219,10 +1219,83 @@
 .log
-(d
+ = originalLog%0A          t.same(output, expOut)%0A          t.same(d, expData
 )%0A  

Add test for outdated --parseable