🎥 Make videos programmatically with React
fix test
Jonny Burger346a1b25b9dc
diff --git a/packages/core/src/test/spring.test.ts b/packages/core/src/test/spring.test.tsindex 4447300da8..f8ef1b3103 100644--- a/packages/core/src/test/spring.test.ts+++ b/packages/core/src/test/spring.test.ts@@ -1,56 +1,53 @@import {isApproximatelyTheSame} from '../is-approximately-the-same';import {spring} from '../spring';-describe('Basic spring should work', () => {- test('Basic spring to equal 0', () => {- expect(- spring({- fps: 30,- frame: 0,- })- ).toEqual(0);- });+test('Basic spring to equal 0', () => {+ expect(+ spring({+ fps: 30,+ frame: 0,+ })+ ).toEqual(0);+});- test('Basic spring to equal 1', () => {- expect(- spring({- fps: 30,- frame: 0,- from: 1,- to: 0,- })- ).toEqual(1);- });+test('Basic spring to equal 1', () => {+ expect(+ spring({+ fps: 30,+ frame: 0,+ from: 1,+ to: 0,+ })+ ).toEqual(1);});-describe('Spring should go to 1', () => {- test('Should be approxmiately the same', () => {- expect(- isApproximatelyTheSame(- spring({- fps: 30,- frame: 1,- }),- 0.04941510804510185- )- ).toBe(true);- });- test('Should be close to 1', () => {- expect(+test('Should be approxmiately the same', () => {+ expect(+ isApproximatelyTheSame(spring({fps: 30,- frame: 100,- })- ).toBeCloseTo(1);- });+ frame: 1,+ }),+ 0.04941510804510185+ )+ ).toBe(true);+});++test('Should be close to 1', () => {+ expect(+ spring({+ fps: 30,+ frame: 100,+ })+ ).toBeCloseTo(1);});-describe('Should be able to set duration for spring', () => {+test('Should be able to set duration for spring', () => {expect(spring({fps: 30,frame: 5,durationInFrames: 5,})- ).toBe(1);+ ).toBeCloseTo(1);});diff --git a/packages/docs/docs/spring.md b/packages/docs/docs/spring.mdindex 3f7d20df53..2ec7c93538 100644--- a/packages/docs/docs/spring.md+++ b/packages/docs/docs/spring.md@@ -74,7 +74,7 @@ Determines whether the animation can shoot over the `to` value. If set to true,### durationInFrames-_Available from v3.0.26_+_Available from v3.0.27_Stretches the animation curve so it is exactly as long as you specify.