UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

13 lines (10 loc) 351 B
var assert = require('assert'), latex = require('../../lib/utils/latex'); describe('util.latex', function() { it('should convert symbols with indices', function () { assert.equal(latex.toSymbol('alpha_1'), '\\alpha_{1}'); }); it('should convert units', function () { assert.equal(latex.toSymbol('deg', true), '^\\circ'); }); });