Skip to content

Commit

Permalink
added test coverage for the bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskuhn-lku committed Jun 14, 2022
1 parent 367beb4 commit 9ee8be7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/lib/commands/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,15 @@ t.test('throws when unpublished', async t => {
)
})

t.test('throws when version not matched', async t => {
const { npm } = await loadMockNpm(t)
await t.rejects(
npm.exec('view', ['blue@2.0.0']),
{ code: 'E404', pkgid: 'blue@2.0.0', message: 'No match found for version 2.0.0' }
)
})


t.test('workspaces', async t => {
const prefixDir = {
'package.json': JSON.stringify({
Expand Down

0 comments on commit 9ee8be7

Please sign in to comment.