From d9a5d43f999e72f30e2f206825654920ea4d118a Mon Sep 17 00:00:00 2001 From: fraisai Date: Tue, 17 Sep 2024 22:20:17 -0400 Subject: [PATCH] added unit test for media constraint obj Co-authored-by: Louis Disen <76222194+LouisDisen@users.noreply.github.com> --- .../unit/mediaStreamConstraints.unit.test.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/__tests__/unit/mediaStreamConstraints.unit.test.ts diff --git a/lib/__tests__/unit/mediaStreamConstraints.unit.test.ts b/lib/__tests__/unit/mediaStreamConstraints.unit.test.ts new file mode 100644 index 0000000..581975e --- /dev/null +++ b/lib/__tests__/unit/mediaStreamConstraints.unit.test.ts @@ -0,0 +1,19 @@ +'use strict'; +import constraints from '../../src/constants/mediaStreamConstraints'; + +describe('Check mediaStreamConstraints object', () => { + const testConstraints = { + video: { + width: { min:640, ideal:1920, max:1920 }, + height: { min:480, ideal:1080, max:1080 }, + }, + // audio: true + audio: { + echoCancellation: true + } + }; + + test('Check all constraint values', () => { + expect(constraints).toMatchObject(testConstraints); + }); +}); \ No newline at end of file