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