mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Ensure _.inRange swaps start with end when start is greater than end. [closes #1099]
This commit is contained in:
@@ -6569,6 +6569,11 @@
|
||||
});
|
||||
});
|
||||
|
||||
test('should swap `start` and `end` when `start` is greater than `end`', 2, function() {
|
||||
strictEqual(_.inRange(2, 5, 1), true);
|
||||
strictEqual(_.inRange(-3, -2, -6), true);
|
||||
});
|
||||
|
||||
test('should work with a floating point `n` value', 4, function() {
|
||||
strictEqual(_.inRange(0.5, 5), true);
|
||||
strictEqual(_.inRange(1.2, 1, 5), true);
|
||||
|
||||
Reference in New Issue
Block a user