UNPKG

mathjax-node

Version:

API's for calling MathJax from node.js

29 lines (27 loc) 535 B
var tape = require('tape'); var mjAPI = require('../lib/main.js'); tape('Catch errors during startup phase', function(t) { t.plan(1); mjAPI.config({ extensions: 'blargh' }); mjAPI.start(); mjAPI.typeset( { math: 'x', format: 'TeX', mml: true }, function(data) { t.ok( data.errors, 'Error (loading non-existent extension) is caught in output' ); // reset configuration mjAPI.config({ extensions: '' }); mjAPI.start(); } ); });