diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-01-15 23:14:24 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2021-01-15 23:47:25 +0300 |
commit | 358e223f208774f9f3bfd7ac50785598ac998ea2 (patch) | |
tree | 0579212baaffd2b596e6d25b88c59513f7dbad24 | |
parent | d6456c8ebb6d7a832d508eadc100094b547fa36c (diff) |
fix: npm ls global tests
-rw-r--r-- | lib/ls.js | 2 | ||||
-rw-r--r-- | test/lib/ls.js | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -99,7 +99,7 @@ const getHumanOutputItem = (node, { args, color, global, long }) => { // special formatting for top-level package name if (node.isRoot) { const hasNoPackageJson = !Object.keys(node.package).length - if (hasNoPackageJson) + if (hasNoPackageJson || global) printable = path else printable += `${long ? EOL : ' '}${path}` diff --git a/test/lib/ls.js b/test/lib/ls.js index 7bbfc5f77..a9504a2ad 100644 --- a/test/lib/ls.js +++ b/test/lib/ls.js @@ -3795,6 +3795,7 @@ t.test('ls --json', (t) => { t.deepEqual( jsonParse(result), { + name: 'ls-ls-json-global', dependencies: { a: { version: '1.0.0', |