style/src/easings/easings.test.ts
2023-07-20 18:15:11 +02:00

26 lines
536 B
TypeScript

import ease from "./easings";
import { expect, it } from "vitest";
const DURATION = 2;
it("returns correct ease quint out with 2 second duration", () => {
const easing = ease.quint(DURATION).out;
expect(easing).toEqual({
ease: [0.23, 1, 0.32, 1],
type: "tween",
duration: DURATION,
});
})
it("returns correct ease circ in with 2 second duration", () => {
const easing = ease.circ(DURATION).in;
expect(easing).toEqual({
ease: [0.6, 0.04, 0.98, 0.335],
type: "tween",
duration: DURATION,
});
});