Skip to content

Commit 8b381be

Browse files
committed
test(utils): add animationUtils tests
1 parent 430a1bf commit 8b381be

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { describe, it, expect } from 'vitest';
2+
import { easeInOut, smoothStep } from '../../utils/animationUtils';
3+
describe('animationUtils', () => {
4+
describe('easeInOut', () => { it('returns 0 at start', () => { expect(easeInOut(0)).toBe(0); }); it('returns 1 at end', () => { expect(easeInOut(1)).toBeCloseTo(1); }); it('returns ~0.5 at midpoint', () => { expect(easeInOut(0.5)).toBeCloseTo(0.5); }); });
5+
describe('smoothStep', () => { it('returns 0 below edge0', () => { expect(smoothStep(0, 1, -0.5)).toBe(0); }); it('returns 1 above edge1', () => { expect(smoothStep(0, 1, 1.5)).toBe(1); }); });
6+
});

0 commit comments

Comments
 (0)