Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-03-16 18:46:34 +0300
committernlf <nlf@github.com>2022-03-17 20:57:03 +0300
commitf0c6e86ca5920baa85355af3ea50ed13f7429a10 (patch)
treefec4bb34da94f3c8f538b8aecf7bc162c48dbac8 /test/lib
parentf95396a033b75e2a3e9aa83f0b06c527641027a4 (diff)
fix: remove name from unpublished message
It is no longer returned from the npm registry
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/commands/view.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/lib/commands/view.js b/test/lib/commands/view.js
index 035490a79..e49133dad 100644
--- a/test/lib/commands/view.js
+++ b/test/lib/commands/view.js
@@ -32,12 +32,15 @@ const packument = (nv, opts) => {
const mocks = {
red: {
+ _id: 'red@1.0.1',
name: 'red',
'dist-tags': {
'1.0.1': {},
},
time: {
- unpublished: new Date(),
+ unpublished: {
+ time: '2012-12-20T00:00:00.000Z',
+ },
},
},
blue: {
@@ -533,7 +536,7 @@ t.test('throws when unpublished', async t => {
const view = new View(npm)
await t.rejects(
view.exec(['red']),
- { code: 'E404' }
+ { code: 'E404', pkgid: 'red@1.0.1', message: 'Unpublished on 2012-12-20T00:00:00.000Z' }
)
})