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:
Diffstat (limited to 'test/lib/workspaces/get-workspaces.js')
-rw-r--r--test/lib/workspaces/get-workspaces.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lib/workspaces/get-workspaces.js b/test/lib/workspaces/get-workspaces.js
index 4ea055e02..0f51d95fc 100644
--- a/test/lib/workspaces/get-workspaces.js
+++ b/test/lib/workspaces/get-workspaces.js
@@ -86,6 +86,17 @@ t.test('get-workspaces', async t => {
'should filter by package name'
)
+ workspaces = await getWorkspaces(['a', 'b'], { path, includeWorkspaceRoot: true })
+ t.same(
+ clean(workspaces, path),
+ new Map(Object.entries({
+ x: '{PATH}',
+ a: '{PATH}/packages/a',
+ b: '{PATH}/packages/b',
+ })),
+ 'include rootspace root'
+ )
+
workspaces = await getWorkspaces(['./packages/c'], { path })
t.same(
clean(workspaces, path),