Skip to content

Commit 65fbb9f

Browse files
committed
add test to a method 'QB.webrtc.getMediaDevices'
1 parent e20bc6c commit 65fbb9f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/QB-WebRTCSpec.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,18 @@ describe('WebRTC API', function() {
4848
QB.webrtc.createNewSession([QBUser2.id], QB.webrtc.CallType.VIDEO);
4949
}).toThrow( new Error(errorString) );
5050
});
51+
52+
it('can to get devices', function(done) {
53+
if(isNodeEnv) {
54+
pending('WebRTC API isn\'t supported outside of the browser');
55+
}
56+
57+
/**
58+
* You need to be sure that your PC has devices
59+
*/
60+
QB.webrtc.getMediaDevices('videoinput').then(function(devices) {
61+
expect(devices.length).not.toBeNull();
62+
done();
63+
});
64+
});
5165
});

0 commit comments

Comments
 (0)