spec: original-fs is available in forked scripts
This commit is contained in:
parent
fa169ee7ff
commit
efd8a8a624
2 changed files with 14 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
assert = require 'assert'
|
||||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
assert = require 'assert'
|
||||
child_process = require 'child_process'
|
||||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
|
||||
describe 'asar package', ->
|
||||
fixtures = path.join __dirname, 'fixtures'
|
||||
|
@ -443,6 +444,13 @@ describe 'asar package', ->
|
|||
stats = originalFs.statSync file
|
||||
assert stats.isFile()
|
||||
|
||||
it 'is available in forked scripts', (done) ->
|
||||
child = child_process.fork path.join(fixtures, 'module', 'original-fs.js')
|
||||
child.on 'message', (msg) ->
|
||||
assert.equal msg, 'object'
|
||||
done()
|
||||
child.send 'message'
|
||||
|
||||
describe 'graceful-fs module', ->
|
||||
gfs = require 'graceful-fs'
|
||||
|
||||
|
|
3
spec/fixtures/module/original-fs.js
vendored
Normal file
3
spec/fixtures/module/original-fs.js
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
process.on('message', function (msg) {
|
||||
process.send(typeof require('original-fs'));
|
||||
});
|
Loading…
Reference in a new issue