Created
July 30, 2018 20:45
-
-
Save ollelauribostrom/ed76663a4d0f8ccfdd0f69b3ae42b527 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inRange from '../src/inRange'; | |
describe('{unit}: Testing inRange', () => { | |
it('should return true if in range', () => { | |
expect(inRange({ number: 5, low: 0, high: 10 })).toEqual(true); | |
}); | |
it('should return false if not in range', () => { | |
expect(inRange({ number: 1, low: 5, high: 10 })).toEqual(false); | |
}); | |
it('should include low value in range', () => { | |
expect(inRange({ number: 5, low: 5, high: 10 })).toEqual(true); | |
}); | |
it('should include high value in range', () => { | |
expect(inRange({ number: 10, low: 0, high: 10 })).toEqual(true); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment