Description: fix tests
 - a test failing with node >= 4
 - a test assuming path of a module
Origin: https://github.com/npm/node-tar/pull/68/commits/5e7484da
Last-Update: 2016-11-17
--- a/test/error-on-broken.js
+++ b/test/error-on-broken.js
@@ -18,8 +18,13 @@
 tap.test('extract test', function (t) {
   var extract = tar.Extract(target)
   var inp = fs.createReadStream(file)
+  var gunzip = inp.pipe(zlib.createGunzip())
+  gunzip.pipe(extract)
 
-  inp.pipe(zlib.createGunzip()).pipe(extract)
+  gunzip.on('error', function (er) {
+    t.equal(er.message, 'unexpected end of file')
+    t.end()
+  })
 
   extract.on('error', function (er) {
     t.equal(er.message, 'unexpected eof', 'error noticed')
--- a/test/extract-move.js
+++ b/test/extract-move.js
@@ -57,10 +57,7 @@
 }
 
 // Make sure we get the graceful-fs that fstream is using.
-var gfs2
-try {
-  gfs2 = require("fstream/node_modules/graceful-fs")
-} catch (er) {}
+var gfs2 = gfs;
 
 var slowMethods = ["chown", "chmod", "utimes", "lutimes"]
 slowMethods.forEach(function (method) {
