diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2020-09-25 06:12:06 +0300 |
---|---|---|
committer | nlf <quitlahok@gmail.com> | 2020-09-29 21:43:49 +0300 |
commit | 2715220c9b5d3f325e65e95bae2b5af8a485a579 (patch) | |
tree | 33fef85be06f6def8d8d5abaa2707538d8d6e3b0 /tap-snapshots | |
parent | 90550b2e023e7638134e91c80ed96828afb41539 (diff) |
fix: added count on reify-output
The added count on lib/utils/reify-output.js only looks up resulting
keys from arb.diff and does not take into account the fact that some of
these pkgs signaled as diff=ADD might in fact not have been installed,
most common scenario are optional deps that could have failed their
install in a given system or opt-out from configs.
This fixes the counting number by looking up at arb.inventory and
confirming it has the node that has been marked as added on diff result.
Fix: #1813
PR-URL: https://github.com/npm/cli/pull/1858
Credit: @ruyadorno
Close: #1858
Reviewed-by: @nlf
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test-lib-utils-reify-output.js-TAP.test.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tap-snapshots/test-lib-utils-reify-output.js-TAP.test.js b/tap-snapshots/test-lib-utils-reify-output.js-TAP.test.js index e1ec1a406..755b23642 100644 --- a/tap-snapshots/test-lib-utils-reify-output.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-reify-output.js-TAP.test.js @@ -5,6 +5,16 @@ * Make sure to inspect the output below. Do not ignore changes! */ 'use strict' +exports[`test/lib/utils/reify-output.js TAP added packages should be looked up within returned tree has added pkg in inventory > must match snapshot 1`] = ` + +added 1 package in {TIME} +` + +exports[`test/lib/utils/reify-output.js TAP added packages should be looked up within returned tree missing added pkg in inventory > must match snapshot 1`] = ` + +up to date in {TIME} +` + exports[`test/lib/utils/reify-output.js TAP packages changed message > {"added":0,"removed":0,"changed":0,"audited":0,"json":false} 1`] = ` up to date in {TIME} |