spec: fix asar spec due to change in node.js
node.js rename the internalModuleReadFile to internalModuleReadJSON change spec to reflect this change
This commit is contained in:
parent
10df019075
commit
3044607746
1 changed files with 6 additions and 6 deletions
|
@ -682,21 +682,21 @@ describe('asar package', function () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('internalModuleReadFile', function () {
|
describe('internalModuleReadJSON', function () {
|
||||||
var internalModuleReadFile = process.binding('fs').internalModuleReadFile
|
var internalModuleReadJSON = process.binding('fs').internalModuleReadJSON
|
||||||
|
|
||||||
it('read a normal file', function () {
|
it('read a normal file', function () {
|
||||||
var file1 = path.join(fixtures, 'asar', 'a.asar', 'file1')
|
var file1 = path.join(fixtures, 'asar', 'a.asar', 'file1')
|
||||||
assert.equal(internalModuleReadFile(file1).toString().trim(), 'file1')
|
assert.equal(internalModuleReadJSON(file1).toString().trim(), 'file1')
|
||||||
var file2 = path.join(fixtures, 'asar', 'a.asar', 'file2')
|
var file2 = path.join(fixtures, 'asar', 'a.asar', 'file2')
|
||||||
assert.equal(internalModuleReadFile(file2).toString().trim(), 'file2')
|
assert.equal(internalModuleReadJSON(file2).toString().trim(), 'file2')
|
||||||
var file3 = path.join(fixtures, 'asar', 'a.asar', 'file3')
|
var file3 = path.join(fixtures, 'asar', 'a.asar', 'file3')
|
||||||
assert.equal(internalModuleReadFile(file3).toString().trim(), 'file3')
|
assert.equal(internalModuleReadJSON(file3).toString().trim(), 'file3')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('reads a normal file with unpacked files', function () {
|
it('reads a normal file with unpacked files', function () {
|
||||||
var p = path.join(fixtures, 'asar', 'unpack.asar', 'a.txt')
|
var p = path.join(fixtures, 'asar', 'unpack.asar', 'a.txt')
|
||||||
assert.equal(internalModuleReadFile(p).toString().trim(), 'a')
|
assert.equal(internalModuleReadJSON(p).toString().trim(), 'a')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue