mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 19:06:31 +00:00
Add test for svg conversion
This commit is contained in:
@@ -12,4 +12,10 @@ describe('eBook Generator', function () {
|
||||
assert(fs.existsSync(path.join(output, "SUMMARY.html")));
|
||||
}, done);
|
||||
});
|
||||
|
||||
it('should correctly convert svg images to png', function(done) {
|
||||
testGeneration(books[4], "ebook", function(output) {
|
||||
assert(fs.existsSync(path.join(output, "test.png")));
|
||||
}, done);
|
||||
});
|
||||
});
|
||||
|
||||
Vendored
+2
@@ -1,3 +1,5 @@
|
||||
# Other Title
|
||||
|
||||
A description
|
||||
|
||||

|
||||
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
|
||||
<svg version="1.1" baseProfile="tiny" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360">
|
||||
<title id="test-title">basic SVG tiny doc</title>
|
||||
<g id="test-body-content">
|
||||
<text font-family="Arial" font-size="14" text-anchor="middle" x="225" y="25">hello world</text>
|
||||
</g>
|
||||
<text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">Revision: 1.1</text>
|
||||
<rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 709 B |
Reference in New Issue
Block a user