mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
wip: migrate to bun
This commit is contained in:
15
test/divide.spec.ts
Normal file
15
test/divide.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import assert from 'node:assert';
|
||||
import divide from '../src/divide';
|
||||
|
||||
describe('divide', () => {
|
||||
it('should divide two numbers', () => {
|
||||
assert.strictEqual(divide(6, 4), 1.5);
|
||||
assert.strictEqual(divide(-6, 4), -1.5);
|
||||
assert.strictEqual(divide(-6, -4), 1.5);
|
||||
});
|
||||
|
||||
it('should coerce arguments to numbers', () => {
|
||||
assert.strictEqual(divide('6', '4'), 1.5);
|
||||
assert.deepStrictEqual(divide('x', 'y'), NaN);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user