mathjs/test/expression/function/parser.test.js
2019-04-28 20:56:08 +02:00

17 lines
476 B
JavaScript

import assert from 'assert'
import math from '../../../src/entry/bundleAny'
const Parser = math.Parser
describe('parser', function () {
it('should create a parser', function () {
const parser = math.parser()
assert(parser instanceof Parser)
})
it('should LaTeX parser', function () { // This doesn't really make sense in a way
const expression = math.parse('parser()')
assert.strictEqual(expression.toTex(), '\\mathrm{parser}\\left(\\right)')
})
})