summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/bundled-transitive-deps.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/bundled-transitive-deps.js')
-rw-r--r--deps/npm/test/tap/bundled-transitive-deps.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/deps/npm/test/tap/bundled-transitive-deps.js b/deps/npm/test/tap/bundled-transitive-deps.js
index 9af12337d6..fe59149062 100644
--- a/deps/npm/test/tap/bundled-transitive-deps.js
+++ b/deps/npm/test/tap/bundled-transitive-deps.js
@@ -7,8 +7,8 @@ var File = Tacks.File
var Dir = Tacks.Dir
var common = require('../common-tap.js')
var npm = require('../../lib/npm.js')
-var tar = require('../../lib/utils/tar.js')
-
+var tar = require('tar')
+var mkdirp = require('mkdirp')
var testdir = path.join(__dirname, path.basename(__filename, '.js'))
var packed = path.join(testdir, 'packed')
@@ -87,10 +87,13 @@ test('bundled-transitive-deps', function (t) {
var tarball = stdout.trim()
t.comment(stderr.trim())
t.is(code, 0, 'pack successful')
- tar.unpack(path.join(testdir, tarball), packed, thenCheckContents)
- }
- function thenCheckContents (err) {
- t.ifError(err, 'unpack successful')
+ mkdirp.sync(packed)
+ tar.extract({
+ file: path.join(testdir, tarball),
+ cwd: packed,
+ strip: 1,
+ sync: true
+ })
var transitivePackedDep = path.join(packed, 'node_modules', 'b')
exists(t, transitivePackedDep)
var nestedScopedDep = path.join(packed, 'node_modules', '@c', 'd', 'node_modules', 'e')