Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor audit tests #4036

Merged
merged 1 commit into from
Nov 10, 2021
Merged

chore: refactor audit tests #4036

merged 1 commit into from
Nov 10, 2021

Conversation

wraithgar
Copy link
Member

Use a real npm object, actually assert things

@wraithgar wraithgar requested a review from a team as a code owner November 10, 2021 21:46
t.plan(1)
const { Npm } = mockNpm(t, {
'npm-audit-report': (_, opts) => {
t.match(opts.reporter, 'json')
Copy link
Member Author

Choose a reason for hiding this comment

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

this test wasn't asserting anything? At least this is better than nothing but the real fix is to introduce nock to our tests and use that instead. Assert the actual end-to-end behaviour we want.

Use a real npm object, actually assert things

PR-URL: #4036
Credit: @wraithgar
Close: #4036
Reviewed-by: @lukekarrys
@wraithgar wraithgar merged commit 201df17 into release-next Nov 10, 2021
@wraithgar wraithgar deleted the gar/audit-tests branch November 10, 2021 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants