mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
15 lines
397 B
JavaScript
15 lines
397 B
JavaScript
import divide from '../src/divide';
|
|
|
|
describe('divide', () => {
|
|
it('should divide two numbers', () => {
|
|
expect(divide(6, 4)).toBe(1.5);
|
|
expect(divide(-6, 4)).toBe(-1.5);
|
|
expect(divide(-6, -4)).toBe(1.5);
|
|
});
|
|
|
|
it('should coerce arguments to numbers', () => {
|
|
expect(divide('6', '4')).toBe(1.5);
|
|
expect(divide('x', 'y')).toEqual(NaN);
|
|
});
|
|
});
|