From 6990333867de0279917468293b1e6eec63d2bfa5 Mon Sep 17 00:00:00 2001 From: Ankit Date: Thu, 4 Apr 2024 15:26:45 +0000 Subject: [PATCH] test: add test for simple addToken --- test/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/index.js b/test/index.js index 60211a5..5969626 100644 --- a/test/index.js +++ b/test/index.js @@ -412,6 +412,15 @@ describe('Ading Token', function () { 33 ) }) + it ('should test simple X token', function () { + mexp.addToken([{ + type: 2, + token: "X", + show: "X", + value: mexp.math.mul, + }]) + assert.equal(mexp.eval("2X3"), 6) + }) it('token with absolute', function () { assert.equal( mexp.eval('root(positive(2-6))', [