-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove mocks from npm audit tests
- Loading branch information
Showing
3 changed files
with
215 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* IMPORTANT | ||
* This snapshot file is auto-generated, but designed for humans. | ||
* It should be checked into source control and tracked carefully. | ||
* Re-generate by setting TAP_SNAPSHOT=1 and running tests. | ||
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/lib/commands/audit.js TAP audit fix > must match snapshot 1`] = ` | ||
added 1 package, and audited 2 packages in 120ms | ||
found 0 vulnerabilities | ||
` | ||
|
||
exports[`test/lib/commands/audit.js TAP json audit > must match snapshot 1`] = ` | ||
{ | ||
"auditReportVersion": 2, | ||
"vulnerabilities": { | ||
"test-dep-a": { | ||
"name": "test-dep-a", | ||
"severity": "high", | ||
"isDirect": true, | ||
"via": [ | ||
{ | ||
"source": 100, | ||
"name": "test-dep-a", | ||
"dependency": "test-dep-a", | ||
"title": "Test advisory 100", | ||
"url": "https://github.com/advisories/GHSA-100", | ||
"severity": "high", | ||
"range": "*" | ||
} | ||
], | ||
"effects": [], | ||
"range": "*", | ||
"nodes": [ | ||
"node_modules/test-dep-a" | ||
], | ||
"fixAvailable": false | ||
} | ||
}, | ||
"metadata": { | ||
"vulnerabilities": { | ||
"info": 0, | ||
"low": 0, | ||
"moderate": 0, | ||
"high": 1, | ||
"critical": 0, | ||
"total": 1 | ||
}, | ||
"dependencies": { | ||
"prod": 2, | ||
"dev": 0, | ||
"optional": 0, | ||
"peer": 0, | ||
"peerOptional": 0, | ||
"total": 1 | ||
} | ||
} | ||
} | ||
` | ||
|
||
exports[`test/lib/commands/audit.js TAP normal audit > must match snapshot 1`] = ` | ||
# npm audit report | ||
test-dep-a * | ||
Severity: high | ||
Test advisory 100 - https://github.com/advisories/GHSA-100 | ||
No fix available | ||
node_modules/test-dep-a | ||
1 high severity vulnerability | ||
Some issues need review, and may require choosing | ||
a different dependency. | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters