spec: graceful-fs should not touch global fs object

This commit is contained in:
Cheng Zhao 2015-01-31 23:51:15 -08:00
parent afd6f41e08
commit 3f8ad3bf75

View file

@ -414,7 +414,11 @@ describe 'asar package', ->
assert stats.isFile()
describe 'graceful-fs module', ->
it 'recognize asar archvies', ->
gfs = require 'graceful-fs'
it 'recognize asar archvies', ->
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