diff options
author | isaacs <i@izs.me> | 2020-10-02 20:48:31 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-10-02 21:37:30 +0300 |
commit | c20e2f0c7766a04f999fdc64faad29277904c2d3 (patch) | |
tree | ca388245fb451428636900b46f1a601b0e2956a2 /test/lib/outdated.js | |
parent | 384f5ec47091eed66c2a47f2c98df3ba7506ec9f (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.js | 33 |
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, |