diff options
author | Gar <gar+gh@danger.computer> | 2022-03-17 21:13:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 21:13:17 +0300 |
commit | 84d19210e5604775a3a413aa32cbba2c103933f2 (patch) | |
tree | 22dd4f45527ace22f8f504b404735b3168498730 /test | |
parent | 2361a68e14f893e97dad53d66fde32082e23521a (diff) |
fix: properly show `npm view ./directory` (#4576)
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/commands/view.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lib/commands/view.js b/test/lib/commands/view.js index e49133dad..82be1201e 100644 --- a/test/lib/commands/view.js +++ b/test/lib/commands/view.js @@ -265,6 +265,9 @@ const packument = (nv, opts) => { if (nv.type === 'git') { return mocks[nv.hosted.project] } + if (nv.raw === './blue') { + return mocks.blue + } return mocks[nv.name] } @@ -390,6 +393,11 @@ t.test('should log info of package in current working dir', async t => { await view.exec(['.']) t.matchSnapshot(logs) }) + + t.test('directory', async t => { + await view.exec(['./blue']) + t.matchSnapshot(logs) + }) }) t.test('should log info by field name', async t => { |