mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Add unit tests for _.max and _.min accepting strings and adjust the build/test-build.js.
Former-commit-id: b567c019146e96ad257dab8fe1b4138d07f470c0
This commit is contained in:
15
test/test.js
15
test/test.js
@@ -1039,6 +1039,21 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.max and lodash.min string iteration');
|
||||
|
||||
_.each(['max', 'min'], function(methodName) {
|
||||
var func = _[methodName];
|
||||
|
||||
test('lodash.' + methodName + ' should iterate a string', function() {
|
||||
_.each(['abc', Object('abc')], function(value) {
|
||||
var actual = func(value);
|
||||
equal(actual, methodName == 'max' ? 'c' : 'a');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.merge');
|
||||
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user