Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-02-08 17:59:24 +0300
committerGar <wraithgar@github.com>2022-02-08 22:23:24 +0300
commite631faf7b5f414c233d723ee11413264532b37de (patch)
treeba725e905e89fde588b0ac6e6ed22ffd443faf90 /workspaces/arborist/test
parentfb6e2ddf942bacf5ae745d16c2d57f3836dce75a (diff)
fix(arborist): save bundleDependencies to package.json when reifying
Diffstat (limited to 'workspaces/arborist/test')
-rw-r--r--workspaces/arborist/test/arborist/reify.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/workspaces/arborist/test/arborist/reify.js b/workspaces/arborist/test/arborist/reify.js
index caa15f59f..7fb1f1f2b 100644
--- a/workspaces/arborist/test/arborist/reify.js
+++ b/workspaces/arborist/test/arborist/reify.js
@@ -1783,6 +1783,17 @@ t.test('save-prod, with optional', async t => {
t.matchSnapshot(fs.readFileSync(path + '/package.json', 'utf8'))
})
+t.test('saveBundle', async t => {
+ const path = t.testdir({
+ 'package.json': JSON.stringify({
+ dependencies: { abbrev: '*' },
+ }),
+ })
+ const arb = newArb({ path })
+ await arb.reify({ add: ['abbrev'], saveType: 'prod', saveBundle: true })
+ t.matchSnapshot(fs.readFileSync(path + '/package.json', 'utf8'))
+})
+
t.test('no saveType: dev w/ compatible peer', async t => {
const path = t.testdir({
'package.json': JSON.stringify({