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
path: root/test
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-03-24 23:37:05 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-03-25 00:04:26 +0300
commit200bee74b31a738687446b7b535cac67b1c582fd (patch)
treefe55030bb7a18d51d3c5960d4ef2e97a0912e8c5 /test
parent7b45e9df6102c7bd6e403d1fdc9939581c38f546 (diff)
fix(config): accept explicit production=false
This allows for overriding the implicit omit value based on if NODE_ENV=production PR-URL: https://github.com/npm/cli/pull/2951 Credit: @wraithgar Close: #2951 Reviewed-by: @ruyadorno
Diffstat (limited to 'test')
-rw-r--r--test/lib/utils/config/definitions.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/utils/config/definitions.js b/test/lib/utils/config/definitions.js
index 75819dcbc..b6e1d1d01 100644
--- a/test/lib/utils/config/definitions.js
+++ b/test/lib/utils/config/definitions.js
@@ -310,9 +310,9 @@ t.test('flatteners that populate flat.omit array', t => {
definitions.production.flatten('production', obj, flat)
t.strictSame(obj, {
production: false,
- include: [],
+ include: ['dev'],
omit: [],
- }, '--no-production has no effect')
+ }, '--no-production explicitly includes dev')
t.strictSame(flat, { omit: [] }, '--no-production has no effect')
obj.production = true