mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Add _.cond test for function checks.
This commit is contained in:
16
test/test.js
16
test/test.js
@@ -2776,6 +2776,22 @@
|
|||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
QUnit.module('lodash.cond');
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
QUnit.test('should throw a TypeError if `pairs` is not composed of functions', function(assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
|
||||||
|
var predicate = lodashStable.constant(true);
|
||||||
|
|
||||||
|
lodashStable.each([true, false], function(value) {
|
||||||
|
assert.raises(function() { _.cond([[predicate, value]]); }, TypeError);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}());
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
QUnit.module('lodash.conforms');
|
QUnit.module('lodash.conforms');
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user