maccounter
15 строк · 595.0 Байт
1import { isBetween } from '@utils/isBetween'
2
3it('isBetween', () => {
4const result1 = isBetween({ value: 1, min: 14, max: 19 })
5const result2 = isBetween({ value: -15, max: 5, min: 10, isStrict: true })
6const result3 = isBetween({ value: -15, max: -10, min: -20, isStrict: true })
7const result4 = isBetween({ value: 0, min: 0, max: 5, isStrict: true })
8const result5 = isBetween({ value: 0, min: 0, max: 5 })
9
10expect(result1).toBeFalsy()
11expect(result2).toBeFalsy()
12expect(result3).toBeTruthy()
13expect(result4).toBeFalsy()
14expect(result5).toBeTruthy()
15})
16