mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
17 lines
473 B
JavaScript
17 lines
473 B
JavaScript
import assert from 'assert'
|
|
import math from '../../../../src/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)')
|
|
})
|
|
})
|