diff options
Diffstat (limited to 'test/lib/arborist-cmd.js')
-rw-r--r-- | test/lib/arborist-cmd.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/lib/arborist-cmd.js b/test/lib/arborist-cmd.js index 91d8a7b33..d2497efe1 100644 --- a/test/lib/arborist-cmd.js +++ b/test/lib/arborist-cmd.js @@ -44,8 +44,7 @@ t.test('arborist-cmd', async t => { class TestCmd extends ArboristCmd {} - const cmd = new TestCmd() - cmd.npm = { localPrefix: path } + const cmd = new TestCmd({ localPrefix: path, config: { validate: () => {} } }) // check filtering for a single workspace name cmd.exec = async function (args) { @@ -97,8 +96,7 @@ t.test('handle getWorkspaces raising an error', async t => { }, }) class TestCmd extends ArboristCmd {} - const cmd = new TestCmd() - cmd.npm = { localPrefix: t.testdir() } + const cmd = new TestCmd({ localPrefix: t.testdir(), config: { validate: () => {} } }) await t.rejects( cmd.execWorkspaces(['foo'], ['a']), |