mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
20 lines
477 B
JavaScript
20 lines
477 B
JavaScript
var assert = require('assert');
|
|
var math = require('../../../index');
|
|
var Parser = math.expression.Parser;
|
|
|
|
describe('parser', function() {
|
|
|
|
it('should create a parser', function() {
|
|
var parser = math.parser();
|
|
|
|
assert(parser instanceof Parser);
|
|
});
|
|
|
|
it('should LaTeX parser', function () { //This doesn't really make sense in a way
|
|
var expression = math.parse('parser()');
|
|
assert.equal(expression.toTex(), '\\mathrm{parser}\\left(\\right)');
|
|
});
|
|
|
|
});
|
|
|