mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Add _.clamp test for just passing the max param.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user