diff options
Diffstat (limited to 'test/lib/ls.js')
-rw-r--r-- | test/lib/ls.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lib/ls.js b/test/lib/ls.js index 5f196501e..46dfd7fba 100644 --- a/test/lib/ls.js +++ b/test/lib/ls.js @@ -110,6 +110,7 @@ const config = { 'package-lock-only': false, } const flatOptions = { + workspacesEnabled: true, } const npm = mockNpm({ config, @@ -1530,6 +1531,25 @@ t.test('ls', (t) => { }) }) + await new Promise((res, rej) => { + config.all = false + config.depth = 0 + npm.color = true + npm.flatOptions.workspacesEnabled = false + ls.exec([], (err) => { + if (err) + rej(err) + + t.matchSnapshot(redactCwd(result), + 'should not list workspaces with --no-workspaces') + config.all = true + config.depth = Infinity + npm.color = false + npm.flatOptions.workspacesEnabled = true + res() + }) + }) + // --all await new Promise((res, rej) => { ls.exec([], (err) => { |