25 lines
886 B
TypeScript
25 lines
886 B
TypeScript
import { motion } from '../theme/motion';
|
|
|
|
describe('motion', () => {
|
|
it('exports bezier strings for easing presets', () => {
|
|
expect(motion.easeOutQuart).toBe('cubic-bezier(0.25, 1, 0.5, 1)');
|
|
expect(motion.easeOutExpo).toBe('cubic-bezier(0.16, 1, 0.3, 1)');
|
|
expect(motion.easeOutBack).toBe('cubic-bezier(0.34, 1.56, 0.64, 1)');
|
|
expect(motion.easeInOutQuart).toBe('cubic-bezier(0.76, 0, 0.24, 1)');
|
|
});
|
|
|
|
it('exports duration presets in ms', () => {
|
|
expect(motion.duration.instant).toBe(80);
|
|
expect(motion.duration.fast).toBe(160);
|
|
expect(motion.duration.normal).toBe(240);
|
|
expect(motion.duration.slow).toBe(380);
|
|
expect(motion.duration.pulse).toBe(800);
|
|
expect(motion.duration.pulseSlow).toBe(1600);
|
|
});
|
|
|
|
it('exports stagger offsets', () => {
|
|
expect(motion.stagger.row).toBe(50);
|
|
expect(motion.stagger.item).toBe(80);
|
|
});
|
|
});
|