diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2018-02-25 09:11:34 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2018-03-23 12:08:56 +0300 |
commit | 143cdbf1327f7d92ccae405bc05d95d28939a837 (patch) | |
tree | 524721353c6a3a62a8a29431fff0c569f054bcb9 /test | |
parent | 23b4a4fac0fbfe8e03e2f65d9f674f163643d15d (diff) |
view: add humanized default view
PR-URL: https://github.com/npm/npm/pull/19910
Credit: @zkat
Reviewed-By: @iarna
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/view.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/tap/view.js b/test/tap/view.js index 371e1d922..4007db4b5 100644 --- a/test/tap/view.js +++ b/test/tap/view.js @@ -111,8 +111,7 @@ test('npm view .', function (t) { ], { cwd: t2dir }, function (err, code, stdout) { t.ifError(err, 'view command finished successfully') t.equal(code, 0, 'exit ok') - var re = new RegExp("name: 'test-repo-url-https'") - t.similar(stdout, re) + t.matches(stdout, /test-repo-url-https/, 'has the right package') t.end() }) }) @@ -217,8 +216,7 @@ test('npm view <package name>', function (t) { ], { cwd: t2dir }, function (err, code, stdout) { t.ifError(err, 'view command finished successfully') t.equal(code, 0, 'exit ok') - var re = new RegExp("name: 'underscore'") - t.similar(stdout, re, 'should have name `underscore`') + t.matches(stdout, /underscore/, 'should have name `underscore`') t.end() }) }) @@ -232,8 +230,7 @@ test('npm view <package name> --global', function (t) { ], { cwd: t2dir }, function (err, code, stdout) { t.ifError(err, 'view command finished successfully') t.equal(code, 0, 'exit ok') - var re = new RegExp("name: 'underscore'") - t.similar(stdout, re, 'should have name `underscore`') + t.matches(stdout, /underscore/, 'should have name `underscore`') t.end() }) }) |