From: Cheng Zhao Date: Sun, 1 Feb 2015 07:51:15 +0000 (-0800) Subject: spec: graceful-fs should not touch global fs object X-Git-Tag: v0.21.1~3^2~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=3f8ad3bf7523fc3402b18855c1604fe7c90130d8;p=electron.git spec: graceful-fs should not touch global fs object --- diff --git a/spec/asar-spec.coffee b/spec/asar-spec.coffee index e78caabb..ae0526f9 100644 --- a/spec/asar-spec.coffee +++ b/spec/asar-spec.coffee @@ -414,7 +414,11 @@ describe 'asar package', -> assert stats.isFile() describe 'graceful-fs module', -> + gfs = require 'graceful-fs' + it 'recognize asar archvies', -> - gfs = require 'graceful-fs' p = path.join fixtures, 'asar', 'a.asar', 'link1' assert.equal gfs.readFileSync(p).toString(), 'file1\n' + + it 'does not touch global fs object', -> + assert.notEqual fs.readdir, gfs.readdir