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:
authorisaacs <i@izs.me>2020-10-02 20:48:31 +0300
committerisaacs <i@izs.me>2020-10-02 21:37:30 +0300
commitc20e2f0c7766a04f999fdc64faad29277904c2d3 (patch)
treeca388245fb451428636900b46f1a601b0e2956a2 /test/lib/outdated.js
parent384f5ec47091eed66c2a47f2c98df3ba7506ec9f (diff)
Support --omit options in npm outdated
PR-URL: https://github.com/npm/cli/pull/1892 Credit: @isaacs Close: #1892 Reviewed-by: @nlf
Diffstat (limited to 'test/lib/outdated.js')
-rw-r--r--test/lib/outdated.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/lib/outdated.js b/test/lib/outdated.js
index ad61f0413..0cba04d54 100644
--- a/test/lib/outdated.js
+++ b/test/lib/outdated.js
@@ -194,6 +194,39 @@ t.test('should display outdated deps', t => {
})
})
+ t.test('outdated --omit=dev', t => {
+ outdated(testDir, {
+ global: false,
+ color: true,
+ omit: ['dev']
+ })([], () => {
+ t.matchSnapshot(logs)
+ t.end()
+ })
+ })
+
+ t.test('outdated --omit=dev --omit=peer', t => {
+ outdated(testDir, {
+ global: false,
+ color: true,
+ omit: ['dev', 'peer']
+ })([], () => {
+ t.matchSnapshot(logs)
+ t.end()
+ })
+ })
+
+ t.test('outdated --omit=prod', t => {
+ outdated(testDir, {
+ global: false,
+ color: true,
+ omit: ['prod']
+ })([], () => {
+ t.matchSnapshot(logs)
+ t.end()
+ })
+ })
+
t.test('outdated --long', t => {
outdated(testDir, {
global: false,