diff --git a/packages/framer-motion/src/animation/legacy-popmotion/__tests__/animate.test.ts b/packages/framer-motion/src/animation/legacy-popmotion/__tests__/animate.test.ts index 4691979796..bce8168fd4 100644 --- a/packages/framer-motion/src/animation/legacy-popmotion/__tests__/animate.test.ts +++ b/packages/framer-motion/src/animation/legacy-popmotion/__tests__/animate.test.ts @@ -35,15 +35,6 @@ describe("animate", () => { ) ) }) - test("Correctly uses a keyframes animation if to is an array", async () => { - return new Promise((resolve) => - testAnimate( - { keyframes: [0, 100], type: "spring" }, - [0, 20, 40, 60, 80, 100], - resolve - ) - ) - }) test("Correctly stops an animation", async () => { const output: number[] = [] diff --git a/packages/framer-motion/src/motion/__tests__/animate-prop.test.tsx b/packages/framer-motion/src/motion/__tests__/animate-prop.test.tsx index b8986e1bc8..92aca0d5c4 100644 --- a/packages/framer-motion/src/motion/__tests__/animate-prop.test.tsx +++ b/packages/framer-motion/src/motion/__tests__/animate-prop.test.tsx @@ -23,19 +23,20 @@ describe("animate prop as object", () => { test("accepts custom transition prop", async () => { const promise = new Promise((resolve) => { const x = motionValue(0) - const onComplete = () => resolve(x.get()) const Component = () => ( 0.5 }, + }} + onUpdate={() => resolve(x.get())} style={{ x }} - onAnimationComplete={onComplete} /> ) const { rerender } = render() rerender() }) - return expect(promise).resolves.toBe(50) + return expect(promise).resolves.toBe(15) }) test("fires onAnimationStart when animation begins", async () => { const promise = new Promise((resolve) => { @@ -389,11 +390,10 @@ describe("animate prop as object", () => { }) const Component = () => ( { const { rerender } = render() rerender() }) - return expect(promise).resolves.toBe(50) + return expect(promise).resolves.toBe(20) }) test("animates previously unseen properties", () => { const Component = ({ animate }: any) => ( diff --git a/packages/framer-motion/src/motion/__tests__/variant.test.tsx b/packages/framer-motion/src/motion/__tests__/variant.test.tsx index 65ce4d5098..5df5221ea1 100644 --- a/packages/framer-motion/src/motion/__tests__/variant.test.tsx +++ b/packages/framer-motion/src/motion/__tests__/variant.test.tsx @@ -176,7 +176,7 @@ describe("animate prop as variant", () => { hidden: { background: "#00f" }, visible: { background: "#f00", - transition: { to: "#555" }, + transition: { from: "#555", ease: () => 0.5 }, }, } const background = motionValue("#00f") @@ -187,7 +187,7 @@ describe("animate prop as variant", () => { animate="visible" variants={variants} transition={{ type: false }} - onAnimationComplete={onComplete} + onUpdate={onComplete} style={{ background }} /> ) @@ -196,7 +196,7 @@ describe("animate prop as variant", () => { rerender() }) - return expect(promise).resolves.toBe("rgba(85, 85, 85, 1)") + return expect(promise).resolves.toBe("rgba(190, 60, 60, 1)") }) test("respects orchestration props in transition prop", async () => { diff --git a/packages/framer-motion/src/utils/delay.ts b/packages/framer-motion/src/utils/delay.ts index 8c3f7a6ccb..7f7185be26 100644 --- a/packages/framer-motion/src/utils/delay.ts +++ b/packages/framer-motion/src/utils/delay.ts @@ -12,7 +12,6 @@ export function delay(callback: DelayedFunction, timeout: number) { const checkElapsed = ({ timestamp }: FrameData) => { const elapsed = timestamp - start - console.log(elapsed) if (elapsed >= timeout) { cancelSync.read(checkElapsed) callback(elapsed - timeout)