Skip to content

Commit 6990333

Browse files
committed
test: add test for simple addToken
1 parent dc92595 commit 6990333

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,15 @@ describe('Ading Token', function () {
412412
33
413413
)
414414
})
415+
it ('should test simple X token', function () {
416+
mexp.addToken([{
417+
type: 2,
418+
token: "X",
419+
show: "X",
420+
value: mexp.math.mul,
421+
}])
422+
assert.equal(mexp.eval("2X3"), 6)
423+
})
415424
it('token with absolute', function () {
416425
assert.equal(
417426
mexp.eval('root(positive(2-6))', [

0 commit comments

Comments
 (0)