Skip to content

🎥 Make videos programmatically with React

fixed ci

Shankhadeep Dey8f6d3a43547b
diff --git a/TESTING.md b/TESTING.md
index 9831814560..4385327364 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -3,10 +3,10 @@ For general information concerning contribution, please consult [CONTRIBUTION.md
### Core Coverage
-![statements](https://img.shields.io/badge/Coverage_statements-80.16%25-yellow.svg)
-![branches](https://img.shields.io/badge/Coverage_branches-75.91%25-yellow.svg)
-![functions](https://img.shields.io/badge/Coverage_functions-63.41%25-red.svg)
-![lines](https://img.shields.io/badge/Coverage_lines-79.24%25-yellow.svg)
+![statements](https://img.shields.io/badge/Coverage_statements-79.73%25-yellow.svg)
+![branches](https://img.shields.io/badge/Coverage_branches-75.76%25-yellow.svg)
+![functions](https://img.shields.io/badge/Coverage_functions-62.54%25-red.svg)
+![lines](https://img.shields.io/badge/Coverage_lines-78.74%25-yellow.svg)
### Running tests
diff --git a/packages/cli/src/editor/components/MediaVolumeSlider.tsx b/packages/cli/src/editor/components/MediaVolumeSlider.tsx
index 8244a52556..d2de1d7d09 100644
--- a/packages/cli/src/editor/components/MediaVolumeSlider.tsx
+++ b/packages/cli/src/editor/components/MediaVolumeSlider.tsx
@@ -6,6 +6,7 @@ import {ControlButton} from './ControlButton';
export const MediaVolumeSlider: React.FC = () => {
const [mediaMuted, setMediaMuted] = Internals.useMediaMutedState();
const [mediaVolume, setMediaVolume] = Internals.useMediaVolumeState();
+ console.log(mediaVolume);
const onClick = useCallback(() => {
setMediaMuted(!mediaMuted);
diff --git a/packages/core/src/test/volume-prop.test.ts b/packages/core/src/test/volume-prop.test.ts
index 3a302b7832..dfebaa332c 100644
--- a/packages/core/src/test/volume-prop.test.ts
+++ b/packages/core/src/test/volume-prop.test.ts
@@ -43,11 +43,13 @@ describe('evaluateVolume throws exception', () => {
});
test('It should throw if volume is invalid type', () => {
const invalidVolume = 'anystring';
- const toEvaluate = {frame: 1, volume: () => invalidVolume};
+ const toEvaluate = {frame: 1, volume: () => invalidVolume, mediaVolume: 1};
+
+ // changing the test because string multiply by a number in javascript is `NaN`
expectToThrow(() => {
// @ts-expect-error
evaluateVolume(toEvaluate);
- }, new RegExp(`You passed in a a function to the volume prop but it did not return a number but a value of type ${typeof invalidVolume} for frame 1`));
+ }, /You passed in a function to the volume prop but it returned NaN for frame 1./);
});
test('It should throw if volume is NaN', () => {
const invalidVolume = NaN;