diff options
Diffstat (limited to 'deps/npm/test/tap/fund.js')
-rw-r--r-- | deps/npm/test/tap/fund.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/npm/test/tap/fund.js b/deps/npm/test/tap/fund.js index 364dc1b6f8..97b414bf6e 100644 --- a/deps/npm/test/tap/fund.js +++ b/deps/npm/test/tap/fund.js @@ -14,6 +14,7 @@ const base = common.pkg const noFunding = path.join(base, 'no-funding-package') const maintainerOwnsAllDeps = path.join(base, 'maintainer-owns-all-deps') const nestedNoFundingPackages = path.join(base, 'nested-no-funding-packages') +const fundingStringShorthand = path.join(base, 'funding-string-shorthand') function getFixturePackage ({ name, version, dependencies, funding }, extras) { const getDeps = () => Object @@ -36,6 +37,13 @@ function getFixturePackage ({ name, version, dependencies, funding }, extras) { } const fixture = new Tacks(Dir({ + 'funding-string-shorthand': Dir({ + 'package.json': File({ + name: 'funding-string-shorthand', + version: '0.0.0', + funding: 'https://example.com/sponsor' + }) + }), 'no-funding-package': Dir({ 'package.json': File({ name: 'no-funding-package', @@ -254,6 +262,13 @@ testFundCmd({ }) testFundCmd({ + title: 'fund using string shorthand', + assertionMsg: 'should open string-only url', + args: ['.', '--no-browser'], + opts: { cwd: fundingStringShorthand } +}) + +testFundCmd({ title: 'fund using package argument with no browser, using --json option', assertionMsg: 'should open funding url', args: ['.', '--json', '--no-browser'], |