Skip to content

Commit a912b1a

Browse files
committed
[test] basic check for svg metadata]
1 parent 8c835e2 commit a912b1a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/svg-metadata.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var tape = require('tape');
2+
var mjAPI = require("..//lib/mj-single.js");
3+
var jsdom = require('jsdom').jsdom;
4+
5+
tape('the SVG output should add dimensions and styles', function(t) {
6+
t.plan(3);
7+
8+
mjAPI.start();
9+
var tex = 'a + b';
10+
11+
mjAPI.typeset({
12+
math: tex,
13+
format: "TeX",
14+
svg: true
15+
}, function(data) {
16+
t.ok(data.width, 'Width is present');
17+
t.ok(data.height, 'Height is present');
18+
t.ok(data.style, 'Style is present');
19+
});
20+
});

0 commit comments

Comments
 (0)