Skip to content

Conversation

claudiahdz
Copy link
Contributor

npm view refactor and unit tests

@claudiahdz claudiahdz added the Release 7.x work is associated with a specific npm 7 release label Aug 4, 2020
@claudiahdz claudiahdz added this to the OSS - Sprint 12 milestone Aug 4, 2020
@claudiahdz claudiahdz requested review from isaacs and ruyadorno August 4, 2020 00:39
@claudiahdz claudiahdz requested a review from a team as a code owner August 4, 2020 00:39
@@ -0,0 +1,492 @@
const t = require('tap')
const mr = require('npm-registry-mock')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a tip, I have been finding it way simpler to just mock the lib that reaches for the registry in the case of unit tests (in this case pacote) then setting up a complete registry mock


dist
.tarball:undefined
.shasum:undefined
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are quite a few undefined all over the snapshots, are these expected due to the nature of the mocked data?

6: [object Object]
7: [object Object]
8: [object Object]
9: [object Object]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were these supposed to be the name?

isaacs pushed a commit that referenced this pull request Aug 4, 2020
@isaacs
Copy link
Contributor

isaacs commented Aug 4, 2020

Landed on 87d27d3. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants