diff --git a/core/src/utils/animation/test/animation.spec.ts b/core/src/utils/animation/test/animation.spec.ts index 6ecf4ed8ca..e6fd267e67 100644 --- a/core/src/utils/animation/test/animation.spec.ts +++ b/core/src/utils/animation/test/animation.spec.ts @@ -385,6 +385,18 @@ describe('cubic-bezier conversion', () => { shouldApproximatelyEqual(getTimeGivenProgression(...equation, 1.02), [0.35, 0.87]); }) + + it('cubic-bezier(0.32, 0.72, 0, 1) (with out of bounds progression)', () => { + const equation = [ + new Point(0, 0), + new Point(0.05, 0.2), + new Point(.14, 1.72), + new Point(1, 1) + ]; + + expect(getTimeGivenProgression(...equation, 1.32)).toBeNaN(); + expect(getTimeGivenProgression(...equation, -0.32)).toBeNaN(); + }) }) });