UNPKG

351 BJavaScriptView Raw
1var assert = require('assert'),
2 latex = require('../../lib/utils/latex');
3
4describe('util.latex', function() {
5 it('should convert symbols with indices', function () {
6 assert.equal(latex.toSymbol('alpha_1'), '\\alpha_{1}');
7 });
8
9 it('should convert units', function () {
10 assert.equal(latex.toSymbol('deg', true), '^\\circ');
11 });
12});