diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2020-08-24 23:07:19 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-08-25 21:08:23 +0300 |
commit | 50f9740ca8000b1c4bd3155bf1bc3d58fb6f0e20 (patch) | |
tree | 4e02431e70b22ac48bb5580503612c77141fd69c /tap-snapshots | |
parent | aa0152b58f34f8cdae05be63853c6e0ace03236a (diff) |
fix: fund with multiple funding sources
`npm fund` human output was appending any items that had multiple
funding sources to the current package title as comma-separated names.
This commit fixes the problem by properly selecting the first item of a
each funding element and only using that as its index for printing the
human output tree representation.
PR-URL: https://github.com/npm/cli/pull/1717
Credit: @ruyadorno
Close: #1717
Reviewed-by: @isaacs
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test-lib-fund.js-TAP.test.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tap-snapshots/test-lib-fund.js-TAP.test.js b/tap-snapshots/test-lib-fund.js-TAP.test.js index 4ff676ca1..7ad86ebee 100644 --- a/tap-snapshots/test-lib-fund.js-TAP.test.js +++ b/tap-snapshots/test-lib-fund.js-TAP.test.js @@ -82,3 +82,13 @@ no-funding-package@0.0.0 ` + +exports[`test/lib/fund.js TAP sub dep with fund info and a parent with no funding info > should nest sub dep as child of root 1`] = ` +test-multiple-funding-sources@1.0.0 ++-- http://example.com/b +| \`-- b@1.0.0 +\`-- http://example.com/c + \`-- c@1.0.0 + + +` |