🎥 Make videos programmatically with React
fix tests
Jonny Burger3e90ec11ed38
diff --git a/packages/shapes/src/test/heart.test.tsx b/packages/shapes/src/test/heart.test.tsxindex b1f94a2ec1..710ba42135 100644--- a/packages/shapes/src/test/heart.test.tsx+++ b/packages/shapes/src/test/heart.test.tsx@@ -13,6 +13,9 @@ test('Should be able to make a heart svg', () => {);expect(- container.querySelector('path')?.getAttribute('d')?.startsWith('M 50 85 C'),+ container+ .querySelector('path')+ ?.getAttribute('d')+ ?.startsWith('M 55.00000000000001 100 C 32.00000000000001'),).toBe(true);});diff --git a/packages/shapes/src/test/make-heart.test.ts b/packages/shapes/src/test/make-heart.test.tsindex 33d02160d0..4e42157c8c 100644--- a/packages/shapes/src/test/make-heart.test.ts+++ b/packages/shapes/src/test/make-heart.test.ts@@ -9,11 +9,23 @@ test('Should be able to make a heart path', () => {depthAdjustment: 0,});- expect(heartPath.width).toEqual(100);- expect(heartPath.height).toEqual(100);- expect(heartPath.transformOrigin).toEqual('50 50');- expect(heartPath.instructions.length).toEqual(6);- expect(heartPath.instructions[0]).toEqual({type: 'M', x: 50, y: 85});- expect(heartPath.instructions[5]).toEqual({type: 'Z'});- expect(heartPath.path.startsWith('M 50 85 C')).toBeTruthy();+ expect(heartPath.width).toBeCloseTo(110);+ expect(heartPath.height).toBeCloseTo(100);+ expect(heartPath.transformOrigin).toEqual('55.00000000000001 50');+ expect(heartPath.instructions.length).toEqual(8);+ expect(heartPath.instructions[0]).toEqual({+ type: 'M',+ x: 55.00000000000001,+ y: 100,+ });+ expect(heartPath.instructions[5]).toEqual({+ cp1x: 97.00000000000001,+ cp1y: 0,+ cp2x: 110.00000000000001,+ cp2y: 13,+ type: 'C',+ x: 110.00000000000001,+ y: 25,+ });+ expect(heartPath.path.startsWith('M 55.00000000000001 100 C')).toBeTruthy();});