spec: Script forked with child_process supports asar archives
This commit is contained in:
parent
45e2dd2ab5
commit
f214e88784
2 changed files with 12 additions and 0 deletions
|
@ -347,6 +347,14 @@ describe 'asar package', ->
|
|||
throws = -> child_process.fork p
|
||||
assert.throws throws, /ENOENT/
|
||||
|
||||
it 'supports asar in the forked js', (done) ->
|
||||
file = path.join fixtures, 'asar', 'a.asar', 'file1'
|
||||
child = child_process.fork path.join(fixtures, 'module', 'asar.js')
|
||||
child.on 'message', (content) ->
|
||||
assert.equal content, fs.readFileSync(file).toString()
|
||||
done()
|
||||
child.send file
|
||||
|
||||
describe 'asar protocol', ->
|
||||
url = require 'url'
|
||||
remote = require 'remote'
|
||||
|
|
4
spec/fixtures/module/asar.js
vendored
Normal file
4
spec/fixtures/module/asar.js
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
var fs = require('fs');
|
||||
process.on('message', function(file) {
|
||||
process.send(fs.readFileSync(file).toString());
|
||||
});
|
Loading…
Add table
Reference in a new issue