Skip to content

🎥 Make videos programmatically with React

added test for interpolatedColors

Shankhadeep Dey37d8292006f3
diff --git a/packages/core/src/test/interpolateColors.test.ts b/packages/core/src/test/interpolateColors.test.ts
new file mode 100644
index 0000000000..458baa3434
--- /dev/null
+++ b/packages/core/src/test/interpolateColors.test.ts
@@ -0,0 +1,9 @@
+import {interpolateColors} from '../interpolateColors';
+import {expectToThrow} from './expect-to-throw';
+
+test('Throws if color space is not right', () => {
+ expectToThrow(() => {
+ //@ts-expect-error
+ interpolateColors(1, [0, 1], ['#ffaadd', '#fabgdf'], 'GFR');
+ }, /invalid color space provided: GFR. Supported values are: \['RGB', 'HSV'\]/);
+});