summaryrefslogtreecommitdiff
path: root/deps/npm/test/lib/commands/outdated.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/lib/commands/outdated.js')
-rw-r--r--deps/npm/test/lib/commands/outdated.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/deps/npm/test/lib/commands/outdated.js b/deps/npm/test/lib/commands/outdated.js
index 245e93039c..3bf42b10a2 100644
--- a/deps/npm/test/lib/commands/outdated.js
+++ b/deps/npm/test/lib/commands/outdated.js
@@ -609,3 +609,28 @@ t.test('workspaces', async t => {
t.matchSnapshot(logs,
'should display missing deps when filtering by ws')
})
+
+t.test('aliases', async t => {
+ const testDir = t.testdir({
+ 'package.json': JSON.stringify({
+ name: 'display-aliases',
+ version: '1.0.0',
+ dependencies: {
+ cat: 'npm:dog@latest',
+ },
+ }),
+ node_modules: {
+ cat: {
+ 'package.json': JSON.stringify({
+ name: 'dog',
+ version: '1.0.0',
+ }),
+ },
+ },
+ })
+
+ await outdated(testDir, {}).exec([])
+
+ t.matchSnapshot(logs, 'should display aliased outdated dep output')
+ t.equal(process.exitCode, 1)
+})