mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 17:47:49 +00:00
wip: code formatting nits continued
This commit is contained in:
14
test/subtract.spec.js
Normal file
14
test/subtract.spec.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import subtract from '../src/subtract';
|
||||
|
||||
describe('subtract', () => {
|
||||
it('should subtract two numbers', () => {
|
||||
expect(subtract(6, 4)).toBe(2);
|
||||
expect(subtract(-6, 4)).toBe(-10);
|
||||
expect(subtract(-6, -4)).toBe(-2);
|
||||
});
|
||||
|
||||
it('should coerce arguments to numbers', () => {
|
||||
expect(subtract('6', '4')).toBe(2);
|
||||
expect(subtract('x', 'y')).toEqual(NaN);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user