import { clamp } from '@/functions/clamp'; describe('clamp tests', () => { it('should clamp min', () => { expect(clamp(-1, 0, 100)).toEqual(0); }); it('should clamp max', () => { expect(clamp(101, 0, 100)).toEqual(100); }); it('should not clamp within range', () => { expect(clamp(50, 0, 100)).toEqual(50); }); });