spec: native-image should read asar archive

This commit is contained in:
Cheng Zhao 2015-02-12 19:34:39 +08:00
parent 3678f13dfb
commit 9646c28a41
2 changed files with 6 additions and 0 deletions

View file

@ -430,3 +430,9 @@ describe 'asar package', ->
it 'does not touch global fs object', ->
assert.notEqual fs.readdir, gfs.readdir
describe 'native-image', ->
it 'reads image from asar archive', ->
p = path.join fixtures, 'asar', 'logo.asar', 'logo.png'
logo = require('native-image').createFromPath p
assert.deepEqual logo.getSize(), {width: 55, height: 55}

BIN
spec/fixtures/asar/logo.asar vendored Normal file

Binary file not shown.