From c525598fd9697fc3074e979a117b5df9fb7b6a51 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 22 Oct 2015 17:08:45 -0700 Subject: [PATCH] Add `_.clamp` test for just passing the `max` param. --- test/test.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test.js b/test/test.js index 108d1f245..bc6c03f78 100644 --- a/test/test.js +++ b/test/test.js @@ -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);