Skip to content

🎥 Make videos programmatically with React

Create handlers.test.ts

Jonny Burger18db5828cc1e
diff --git a/packages/lambda/src/test/handlers.test.ts b/packages/lambda/src/test/handlers.test.ts
new file mode 100644
index 0000000000..5d08f995f0
--- /dev/null
+++ b/packages/lambda/src/test/handlers.test.ts
@@ -0,0 +1,17 @@
+import {Internals} from 'remotion';
+import {handler} from '../functions/index';
+import {Await} from '../shared/await';
+import {LambdaRoutines} from '../shared/constants';
+import {LambdaReturnValues} from '../shared/return-values';
+
+test('Info handler should return version', async () => {
+ Internals.Logging.setLogLevel('error');
+ const response = await handler({
+ type: LambdaRoutines.info,
+ });
+
+ expect(
+ typeof (response as Await<LambdaReturnValues[LambdaRoutines.info]>)
+ .version === 'string'
+ ).toBe(true);
+});