ant-design/components/_util/__tests__/easings.test.ts

13 lines
315 B
TypeScript
Raw Normal View History

2019-08-07 22:46:35 +08:00
import { easeInOutCubic } from '../easings';
describe('Test easings', () => {
it('easeInOutCubic return value', () => {
const nums: number[] = [];
2019-08-07 22:46:35 +08:00
for (let index = 0; index < 5; index++) {
nums.push(easeInOutCubic(index, 1, 5, 4));
}
expect(nums).toEqual([1, 1.25, 3, 4.75, 5]);
});
});