test: add easings.ts test suite

This commit is contained in:
shaodahong 2019-08-07 22:46:35 +08:00 committed by shao
parent ebdbd0ef6f
commit b1cd8e32d9

View File

@ -0,0 +1,12 @@
import { easeInOutCubic } from '../easings';
describe('Test easings', () => {
it('easeInOutCubic return value', () => {
const nums = [];
for (let index = 0; index < 5; index++) {
nums.push(easeInOutCubic(index, 1, 5, 4));
}
expect(nums).toEqual([1, 1.25, 3, 4.75, 5]);
});
});