Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 3e41360

Browse files
yodeyeriarna
authored andcommitted
test: Fix test that was inappropriately hitting the network
Credit: @yodeyer Reviewed-By: @iarna PR-URL: #11987
1 parent b8c7cd7 commit 3e41360

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

test/tap/outdated-symlink.js

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,26 @@ test('setup', function (t) {
5151

5252
test('when outdated is called linked packages should be displayed as such', function (t) {
5353
var regOutLinked = /my-local-package\s*1.0.0\s*linked\s*linked\n/
54-
var regOutInstallOne = /async\s*0.2.9\s*0.2.9\s*1.5.2\n/
55-
var regOutInstallTwo = /underscore\s*1.3.1\s*1.3.1\s*1.8.3\n/
54+
var regOutInstallOne = /async\s*0.2.9\s*0.2.9\s*0.2.10\n/
55+
var regOutInstallTwo = /underscore\s*1.3.1\s*1.3.1\s*1.5.1\n/
5656

5757
console.log = function () {}
5858
mr({ port: common.port }, function (er, s) {
59-
common.npm(['outdated', '-g'], OPTS, function (err, c, out, stderr) {
60-
t.ifError(err)
61-
t.ok(out.match(regOutLinked), 'Global Link format as expected')
62-
t.ok(out.match(regOutInstallOne), 'Global Install format as expected')
63-
t.ok(out.match(regOutInstallTwo), 'Global Install format as expected')
64-
s.close()
65-
t.end()
66-
})
59+
common.npm(
60+
[
61+
'--registry', common.registry,
62+
'outdated', '-g'
63+
],
64+
OPTS,
65+
function (err, c, out, stderr) {
66+
t.ifError(err)
67+
t.ok(out.match(regOutLinked), 'Global Link format as expected')
68+
t.ok(out.match(regOutInstallOne), 'Global Install format as expected')
69+
t.ok(out.match(regOutInstallTwo), 'Global Install format as expected')
70+
s.close()
71+
t.end()
72+
}
73+
)
6774
})
6875
})
6976

0 commit comments

Comments
 (0)