diff options
author | isaacs <i@izs.me> | 2019-06-30 00:54:10 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2019-06-30 09:43:13 +0300 |
commit | 6bb935c092170fea549f63a605055fc0a57abd1e (patch) | |
tree | 267f82229317206c17961198580d1fd5302c1672 /test | |
parent | 33e2d1dacb916bbb332ac7ee9ae8e1a519ee14f6 (diff) |
read-package-tree@5.3.1
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/no-scan-full-global-dir.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/tap/no-scan-full-global-dir.js b/test/tap/no-scan-full-global-dir.js index 4ec403ddc..7856ff33f 100644 --- a/test/tap/no-scan-full-global-dir.js +++ b/test/tap/no-scan-full-global-dir.js @@ -6,6 +6,9 @@ var requireInject = require('require-inject') var osenv = require('osenv') var npm = require('../../lib/npm.js') +// XXX update this when rpt's realpath.js is extracted out +var rptRealpath = require.resolve('read-package-tree/realpath.js') + const common = require('../common-tap.js') const pkg = common.pkg var packages = { @@ -41,6 +44,8 @@ mockFs.realpath = function (dir, cb) { return cb(null, dir) } +const mockRptRealpath = path => Promise.resolve(path) + test('setup', function (t) { npm.load(function () { t.pass('npm loaded') @@ -54,7 +59,8 @@ test('installer', function (t) { 'fs': mockFs, 'readdir-scoped-modules': mockReaddir, 'read-package-json': mockReadPackageJson, - 'mkdirp': function (path, cb) { cb() } + 'mkdirp': function (path, cb) { cb() }, + [rptRealpath]: mockRptRealpath }) var Installer = installer.Installer @@ -83,7 +89,8 @@ test('uninstaller', function (t) { 'fs': mockFs, 'readdir-scoped-modules': mockReaddir, 'read-package-json': mockReadPackageJson, - 'mkdirp': function (path, cb) { cb() } + 'mkdirp': function (path, cb) { cb() }, + [rptRealpath]: mockRptRealpath }) var Uninstaller = uninstaller.Uninstaller |