diff --git a/test/mediawiki-definecolor.js b/test/mediawiki-definecolor.js new file mode 100644 index 00000000..0e0654e5 --- /dev/null +++ b/test/mediawiki-definecolor.js @@ -0,0 +1,20 @@ +var tape = require('tape'); +var mjAPI = require("../lib/main.js"); + +tape('mediawiki-texvc test: check MathJax core', function(t) { + t.plan(1); + + var tex = '\\definecolor{myorange}{RGB}{255,165,100}\\color{myorange}e^{i \\pi}\\color{Black} = -1'; + mjAPI.config( { + extensions: 'TeX/autoload-all', // a convenience option to add MathJax extensions + }); + mjAPI.start(); + + mjAPI.typeset({ + math: tex, + format: "inline-TeX", + mml: true + }, function(data) { + t.ok(!data.errors, 'definecolor should be a known function'); + }); +});