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/root.js')
-rw-r--r--test/lib/root.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/root.js b/test/lib/root.js
index 8c23152b3..e8ccc1106 100644
--- a/test/lib/root.js
+++ b/test/lib/root.js
@@ -5,14 +5,14 @@ test('root', (t) => {
t.plan(3)
const dir = '/root/dir'
- const root = requireInject('../../lib/root.js', {
- '../../lib/npm.js': { dir },
+ const Root = requireInject('../../lib/root.js', {
'../../lib/utils/output.js': (output) => {
t.equal(output, dir, 'prints the correct directory')
},
})
+ const root = new Root({ dir })
- root([], (err) => {
+ root.exec([], (err) => {
t.ifError(err, 'npm root')
t.ok('should have printed directory')
})