Add _.clamp test for just passing the max param.

This commit is contained in:
John-David Dalton
2015-10-22 17:08:45 -07:00
parent f54cfb0ea2
commit c525598fd9

View File

@@ -2031,6 +2031,13 @@
QUnit.module('lodash.clamp');
(function() {
QUnit.test('should work with a `max` argument', function(assert) {
assert.expect(2);
assert.strictEqual(_.clamp(5, 3), 3);
assert.strictEqual(_.clamp(1, 3), 1);
});
QUnit.test('should clamp negative numbers', function(assert) {
assert.expect(3);