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

14 lines
349 B
JavaScript
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 = [];
2019-08-07 23:05:05 +08:00
// eslint-disable-next-line no-plusplus
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]);
});
});