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
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-04-02 02:45:01 +0300
committerGar <wraithgar@github.com>2022-04-04 21:35:15 +0300
commitedbd884f6a1f077c7b4e1b7127b0a0f14ae065a0 (patch)
tree7cc83f6226ebba70a45c0e9662f13f703a1b435c /tap-snapshots
parentef2a8a312f0f6784a84c7f4659ef2601a650d04e (diff)
chore: remove mocks from npm audit tests
Diffstat (limited to 'tap-snapshots')
-rw-r--r--tap-snapshots/test/lib/commands/audit.js.test.cjs76
1 files changed, 76 insertions, 0 deletions
diff --git a/tap-snapshots/test/lib/commands/audit.js.test.cjs b/tap-snapshots/test/lib/commands/audit.js.test.cjs
new file mode 100644
index 000000000..1f8e2e6c7
--- /dev/null
+++ b/tap-snapshots/test/lib/commands/audit.js.test.cjs
@@ -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.
+`