2025-04-10 22:47:30 -07:00
|
|
|
import assert from 'assert'
|
|
|
|
|
import math from '../numbers.js'
|
|
|
|
|
|
|
|
|
|
describe('the numbers-only bundle', () => {
|
|
|
|
|
it('works like regular on number-only functions', () => {
|
|
|
|
|
assert.strictEqual(math.quotient(5, 3), 1)
|
|
|
|
|
assert.strictEqual(math.square(-3), 9)
|
|
|
|
|
})
|
2025-04-13 01:35:10 -07:00
|
|
|
it('uses 1 and 0 instead of true and false', () => {
|
|
|
|
|
assert.strictEqual(math.isnan(-16.5), 0)
|
|
|
|
|
assert.strictEqual(math.isnan(NaN), 1)
|
|
|
|
|
})
|
2025-04-10 22:47:30 -07:00
|
|
|
})
|