Closed wraithgar closed 2 days ago
Test coverage failures are due to two things: Two functions which always get passed an object, and never get defaulted now, and uncovered lines in the packument cache because of missing headers in the mock registry.
BREAKING CHANGE: npm will no longer fall back to the old audit endpoint if the bulk advisory request fails.
This legacy code has a long tail in npm. Getting rid of it was difficult because of how load-bearing some of those requests were in tests. This PR removes the old "mock server" that arborist tests spun up, and moved that logic into the existing mock registry that the cli uses. This will allow us to consolidate our logic in tests, and also outline more granularly which tests actually make registry requests.
A few tests that were testing just the fallback behavior were also removed.
Closes: https://github.com/npm/statusboard/issues/900