feat(poortf): add concept of 'author' to an imp of a TF
And make it so that if the same author adds imps again, they replace the previous imps from that author. Use this feature to avoid the explicit check for double-inclusion in subtract, and test it worked.
This commit is contained in:
parent
2c1b6c3364
commit
00a7f79552
4 changed files with 34 additions and 13 deletions
|
@ -20,4 +20,8 @@ describe('The default full picomath instance "math"', () => {
|
|||
math.complex(11, -4))
|
||||
assert.deepStrictEqual(math.negate(math.complex(3, '8')).im, -8)
|
||||
})
|
||||
|
||||
it('does not double-define subtract', () => {
|
||||
assert.deepStrictEqual(math.subtract.imps.length, 1)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue