mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add _.divide and _.multiply.
This commit is contained in:
@@ -929,7 +929,7 @@
|
||||
var func = fp[methodName],
|
||||
isAdd = methodName == 'add';
|
||||
|
||||
QUnit.test('`fp.' + methodName + '` should have `rearg` applied', function(assert) {
|
||||
QUnit.test('`fp.' + methodName + '` should not have `rearg` applied', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
assert.strictEqual(func('1')('2'), isAdd ? '12' : -1);
|
||||
@@ -1021,6 +1021,21 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('fp.divide and fp.multiply');
|
||||
|
||||
_.each(['divide', 'multiply'], function(methodName) {
|
||||
var func = fp[methodName],
|
||||
isDivide = methodName == 'divide';
|
||||
|
||||
QUnit.test('`fp.' + methodName + '` should not have `rearg` applied', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
assert.strictEqual(func('2')('4'), isDivide ? 0.5 : 8);
|
||||
});
|
||||
});
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('fp.extend');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user