Skip to content

🎥 Make videos programmatically with React

nevermind. looking good!

Jonny Burger7a9f8749655f
diff --git a/packages/core/src/test/start-at.tsx b/packages/core/src/test/audio.test.tsx
similarity index 88%
rename from packages/core/src/test/start-at.tsx
rename to packages/core/src/test/audio.test.tsx
index bd9f3f567a..ad441dcea0 100644
--- a/packages/core/src/test/start-at.tsx
+++ b/packages/core/src/test/audio.test.tsx
@@ -1,7 +1,6 @@
import {render} from '@testing-library/react';
import React from 'react';
import {Audio} from '../audio';
-import {Video} from '../video/Video';
import {expectToThrow} from './expect-to-throw';
test('It should throw if startAt prop is negative', () => {
@@ -20,7 +19,7 @@ test('It should throw if endAt prop is negative', () => {
test('It should throw if endAt is less than startAt', () => {
expectToThrow(
- () => render(<Video startAt={10} endAt={1} />),
+ () => render(<Audio startAt={10} endAt={1} />),
/endAt prop must be greater than startAt prop/
);
});
@@ -36,7 +35,7 @@ test('It should throw if endAt is not a number', () => {
test('It should throw if startAt is not a number', () => {
expectToThrow(
//@ts-expect-error
- () => render(<Video startAt={'hey'} />),
+ () => render(<Audio startAt={'hey'} />),
/type of startAt prop must be a number, instead got type string./
);
});
@@ -54,7 +53,7 @@ test('It should throw if startAt is NaN or Infinity', () => {
/startAt prop can not be NaN or Infinity./
);
expectToThrow(
- () => render(<Video startAt={Infinity} />),
+ () => render(<Audio startAt={Infinity} />),
/startAt prop can not be NaN or Infinity./
);
});
diff --git a/packages/core/src/test/video.test.tsx b/packages/core/src/test/video.test.tsx
index 1a598e4c6f..d28c9891f2 100644
--- a/packages/core/src/test/video.test.tsx
+++ b/packages/core/src/test/video.test.tsx
@@ -28,7 +28,7 @@ test('It should throw if endAt is not a number', () => {
expectToThrow(
//@ts-expect-error
() => render(<Video endAt={'hey'} />),
- /type of endAt prop is a number, instead got type string./
+ /type of endAt prop must be a number, instead got type string./
);
});
@@ -36,7 +36,7 @@ test('It should throw if startAt is not a number', () => {
expectToThrow(
//@ts-expect-error
() => render(<Video startAt={'hey'} />),
- /type of startAt prop is a number, instead got type string./
+ /type of startAt prop must be a number, instead got type string./
);
});