From 48d2db6037487fd782f67bbcd2cf12e009ece17b Mon Sep 17 00:00:00 2001 From: Gar Date: Sat, 7 May 2022 09:11:18 -0700 Subject: 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. --- package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'package.json') 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, -- cgit v1.2.3