Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/test/tap/outdated-depth.js b/test/tap/outdated-depth.js
index 5cf7c7eda..c3d87c64c 100644
--- a/test/tap/outdated-depth.js
+++ b/test/tap/outdated-depth.js
@@ -47,6 +47,7 @@ test('outdated depth zero', function (t) {
mr({ port: common.port }, function (er, s) {
npm.load(
{
+ depth: 0,
loglevel: 'silent',
registry: common.registry
},
@@ -54,12 +55,22 @@ test('outdated depth zero', function (t) {
npm.install('.', function (er) {
if (er) throw new Error(er)
npm.outdated(function (err, d) {
- t.ifError(err, 'npm outdated ran without error')
+ if (err) {
+ throw err
+ }
t.is(process.exitCode, 1, 'exit code set to 1')
process.exitCode = 0
t.deepEqual(d[0], expected)
- s.close()
- t.end()
+ t.equal(d.length, 1)
+ npm.config.set('depth', 1)
+ npm.outdated(function (err, d) {
+ t.equal(d.length, 2)
+ if (err) {
+ throw err
+ }
+ s.close()
+ t.end()
+ })
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.