From 3f8ad3bf7523fc3402b18855c1604fe7c90130d8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 31 Jan 2015 23:51:15 -0800 Subject: [PATCH] spec: graceful-fs should not touch global fs object --- spec/asar-spec.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/asar-spec.coffee b/spec/asar-spec.coffee index e78caabb09f4..ae0526f9fe1b 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