Minor tweaks to is.inRange()
This commit is contained in:
parent
3cbef48b6c
commit
26ca195302
3 changed files with 34 additions and 6 deletions
12
test.js
12
test.js
|
|
@ -314,7 +314,19 @@ test('is.inRange', t => {
|
|||
t.true(m.inRange(x, [-5, 5]));
|
||||
t.true(m.inRange(x, [5, -5]));
|
||||
t.false(m.inRange(x, [4, 8]));
|
||||
t.true(m.inRange(-7, [-5, -10]));
|
||||
t.true(m.inRange(-5, [-5, -10]));
|
||||
t.true(m.inRange(-10, [-5, -10]));
|
||||
|
||||
t.true(m.inRange(x, 10));
|
||||
t.true(m.inRange(0, 0));
|
||||
t.false(m.inRange(x, 2));
|
||||
|
||||
t.throws(() => {
|
||||
t.true(m.inRange(0));
|
||||
});
|
||||
|
||||
t.throws(() => {
|
||||
t.true(m.inRange(0, [5]));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue