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