mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Add _.clamp test for just passing the max param.
This commit is contained in:
@@ -2031,6 +2031,13 @@
|
|||||||
QUnit.module('lodash.clamp');
|
QUnit.module('lodash.clamp');
|
||||||
|
|
||||||
(function() {
|
(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) {
|
QUnit.test('should clamp negative numbers', function(assert) {
|
||||||
assert.expect(3);
|
assert.expect(3);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user