diff --git a/test/assets-inliner.js b/test/assets-inliner.js
index 0636a1b5d..dd63b4152 100644
--- a/test/assets-inliner.js
+++ b/test/assets-inliner.js
@@ -9,18 +9,21 @@ describe('Assets Inliner Output', function() {
var output;
before(function() {
+ var SVG = '';
+
return mock.outputDefaultBook(AssetsInliner, {
'README.md': '',
- 'test.svg': ''
+ 'inline.md': 'This is a svg: '+SVG,
+ 'test.svg': '' + SVG
})
.then(function(_output) {
output = _output;
});
});
- it('should correctly convert to PNG', function() {
- var readme = output.book.getPage('README.md');
- var $ = cheerio.load(readme.content);
+ it('should correctly SVG files convert to PNG', function() {
+ var page = output.book.getPage('README.md');
+ var $ = cheerio.load(page.content);
// Is there an image?
var $img = $('img');
@@ -31,6 +34,18 @@ describe('Assets Inliner Output', function() {
output.should.have.file(src);
});
+ it('should correctly inline SVG convert to PNG', function() {
+ var page = output.book.addPage('README.md');
+ var $ = cheerio.load(page.content);
+
+ // Is there an image?
+ var $img = $('img');
+ $img.length.should.equal(1);
+
+ // Does the file exists
+ var src = $img.attr('src');
+ output.should.have.file(src);
+ });
});
});