feat(PocomathInstance): Add .returnTypeOf method
This commit is contained in:
parent
95f6ccc5a0
commit
340dbd436e
2 changed files with 15 additions and 1 deletions
|
@ -20,6 +20,10 @@ describe('The default full pocomath instance "math"', () => {
|
|||
assert.strictEqual(math.typeOf({re: 6.28, im: 2.72}), 'Complex<number>')
|
||||
})
|
||||
|
||||
it('can determine the return types of operations', () => {
|
||||
assert.strictEqual(math.returnTypeOf('negate', 'number'), 'number')
|
||||
})
|
||||
|
||||
it('can subtract numbers', () => {
|
||||
assert.strictEqual(math.subtract(12, 5), 7)
|
||||
//assert.strictEqual(math.subtract(3n, 1.5), 1.5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue