You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-08-08 03:42:14 +03:00
Extract requestMediaPermissions (#9568)
This commit is contained in:
@@ -86,3 +86,11 @@ fetchMock.catch("");
|
||||
fetchMock.get("/image-file-stub", "image file stub");
|
||||
// @ts-ignore
|
||||
window.fetch = fetchMock.sandbox();
|
||||
|
||||
// set up mediaDevices mock
|
||||
Object.defineProperty(navigator, "mediaDevices", {
|
||||
value: {
|
||||
enumerateDevices: jest.fn().mockResolvedValue([]),
|
||||
getUserMedia: jest.fn(),
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user