Skip to content

Commit

Permalink
test: add test for simple addToken
Browse files Browse the repository at this point in the history
  • Loading branch information
bugwheels94 committed Apr 4, 2024
1 parent dc92595 commit 6990333
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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))', [
Expand Down

0 comments on commit 6990333

Please sign in to comment.