Skip to content

🎥 Make videos programmatically with React

Update test

Ravi Jain5584eb863461
diff --git a/packages/renderer/src/test/validate-concurrency.test.ts b/packages/renderer/src/test/validate-concurrency.test.ts
index 2c87b6bb01..e0aaa709e7 100644
--- a/packages/renderer/src/test/validate-concurrency.test.ts
+++ b/packages/renderer/src/test/validate-concurrency.test.ts
@@ -3,10 +3,10 @@ import {validateConcurrency} from '../validate-concurrency';
const invalidConcurrency: String = 'invalidConcurrency';
-test('setConcurrency should throw if concurrency is not a number', () => {
+test('setConcurrency should throw if concurrency is not a number or percentage', () => {
expect(() =>
validateConcurrency(invalidConcurrency, 'concurrencyPerLambda')
- ).toThrow(/concurrencyPerLambda must be a number but is/);
+ ).toThrow(/concurrencyPerLambda must be a number or percentage, but is/);
});
test('setConcurrency should NOT throw if concurrency is a number', () => {
diff --git a/packages/renderer/src/validate-concurrency.ts b/packages/renderer/src/validate-concurrency.ts
index 2c0c43cf5c..8d68d573ee 100644
--- a/packages/renderer/src/validate-concurrency.ts
+++ b/packages/renderer/src/validate-concurrency.ts
@@ -28,6 +28,6 @@ export const validateConcurrency = (value: unknown, setting: string) => {
);
}
} else if(!(/^\d+(\.\d+)?%$/.test(value))) {
- throw new Error(setting + ' must be a valid percentage, but is ' + value);
+ throw new Error(setting + ' must be a number or percentage, but is ' + value);
}
};