Commit 54016475 by Edgar HIPP

Update tests for node v4+

parent a25ffa86
......@@ -62,6 +62,7 @@ module.exports= class ImgReplacer
@qr[u]= new DocxQrCode(png,@xmlTemplater,imgName,num,@getDataFromString)
@qr[u].decode(@imageSetter)
catch e
console.error e
@imageSetter(mockedQrCode)
dat= png.decode(finished)
else
......
......@@ -245,7 +245,7 @@ describe 'qrcode replacing',->
images=zip.file(/media\/.*.png/)
expect(images.length).to.equal(3)
expect(images[0].asText().length).to.equal(826)
expect(images[1].asText().length).to.equal(12888)
expect(images[1].asText().length).to.be.within(12888, 12900)
expect(images[2].asText().length).to.be.within(17417,17440)
done()
......@@ -272,7 +272,7 @@ describe 'qrcode replacing',->
images=zip.file(/media\/.*.png/)
expect(images.length).to.equal(3)
expect(images[0].asText().length).to.equal(826)
expect(images[1].asText().length).to.equal(12888)
expect(images[1].asText().length).to.be.within(12888, 12900)
expect(images[2].asText().length).to.be.within(17417,17440)
done()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment