🎥 Make videos programmatically with React
tests: use jest expect().toThrow syntax
SkyezerFoxbd9a16b52258
diff --git a/TESTING.md b/TESTING.mdindex 4530f6102b..28fd4ae54d 100644--- a/TESTING.md+++ b/TESTING.md@@ -4,10 +4,10 @@ For general information concerning contribution, please consult [CONTRIBUTION.md### Core Coverage----++++### Running testsdiff --git a/packages/player/src/test/validate-prop.test.tsx b/packages/player/src/test/validate-prop.test.tsxindex 08e8cde6f4..ecef88afad 100644--- a/packages/player/src/test/validate-prop.test.tsx+++ b/packages/player/src/test/validate-prop.test.tsx@@ -190,16 +190,7 @@ test('playbackRate of undefined should be okay', () => {});test('passing in <Composition /> instance should not be possible', () => {- const compositionProps = {- id: 'HelloWorld',- width: 500,- height: 400,- fps: 30,- durationInFrames: 500,- component: HelloWorld,- };- let threwError = false;- try {+ expect(() => {render(<PlayercompositionWidth={500}@@ -219,26 +210,9 @@ test('passing in <Composition /> instance should not be possible', () => {}}/>);- render(- <Player- compositionWidth={500}- compositionHeight={400}- fps={30}- durationInFrames={500}- component={() => <Composition {...compositionProps} />}- controls- showVolumeControls- inputProps={compositionProps}- />- );- } catch (e) {- threwError = true;- expect((e as Error).message).toMatch(- /'component' must not be an instance of the '<Composition \\>' component./- );- } finally {- expect(threwError).toBe(true);- }+ }).toThrow(+ /'component' must not be an instance of the '<Composition \\>' component./+ );});test.each([