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-05-07 19:11:18 +0300
committerGitHub <noreply@github.com>2022-05-07 19:11:18 +0300
commit48d2db6037487fd782f67bbcd2cf12e009ece17b (patch)
treeaf1907ea0d36bfd9d7c5673ae51e4e8b3a4c7760 /package.json
parent8e7ea9b61afe37de6017ff77c142ef3abdff6bec (diff)
fix: remove test coverage map (#4862)
Turns out there were three files that still had no test coverage because of the combination of the mocks in tests and the coverage map. Removing the map altogether exposed them. This PR removes the coverage map and fixes test to cover all lines that were being missed. While adding coverage to the `npm search` codebase multiple unneeded guards and at least one bug was found (it was impossible to exclude searches based on username). These were fixed. The `npm view` tests were also refactored to use the real npm object. Finally, a small inlining of lib/utils/file-exists.js was done.
Diffstat (limited to 'package.json')
-rw-r--r--package.json9
1 files changed, 7 insertions, 2 deletions
diff --git a/package.json b/package.json
index d3e55ad62..687e9025f 100644
--- a/package.json
+++ b/package.json
@@ -230,8 +230,13 @@
],
"color": 1,
"files": "test/{lib,bin,index.js}",
- "coverage-map": "test/coverage-map.js",
- "timeout": 600
+ "timeout": 600,
+ "nyc-arg": [
+ "--exclude",
+ "workspaces/**",
+ "--exclude",
+ "tap-snapshots/**"
+ ]
},
"templateOSS": {
"rootRepo": false,