1 import isBetween from './isBetween';
3 describe('isBetween()', () => {
4 it('returns true if a given number is between two other given number', () => {
5 expect(isBetween(5, -10, 10)).toBe(true);
8 it('returns true if a given number is exactly equal to the min', () => {
9 expect(isBetween(-10, -10, 10)).toBe(true);
12 it('returns false if a given number is exactly equal to the max', () => {
13 expect(isBetween(10, -10, 10)).toBe(false);
16 it('returns false if a given number is outside two other given number', () => {
17 expect(isBetween(20, -10, 10)).toBe(false);