Commit 5404f35a by Edgar Hipp

adding failing test for inserting Inline images (issue #2)

parent 2210abdd
...@@ -5,6 +5,7 @@ expect=require('chai').expect ...@@ -5,6 +5,7 @@ expect=require('chai').expect
fileNames=[ fileNames=[
'imageExample.docx', 'imageExample.docx',
'imageLoopExample.docx', 'imageLoopExample.docx',
'imageInlineExample.docx',
] ]
ImageModule=require('../js/index.js') ImageModule=require('../js/index.js')
...@@ -119,3 +120,16 @@ describe 'image adding with {% image} syntax', ()-> ...@@ -119,3 +120,16 @@ describe 'image adding with {% image} syntax', ()->
buffer=zip.generate({type:"nodebuffer"}) buffer=zip.generate({type:"nodebuffer"})
fs.writeFile("test_multi.docx",buffer); fs.writeFile("test_multi.docx",buffer);
it 'should work with inline images',()->
name='imageInlineExample.docx'
imageModule=new ImageModule()
docX[name].attachModule(imageModule)
out=docX[name]
.load(docX[name].loadedContent)
.setData({firefox:'examples/image2.png'})
out
.render()
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