You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +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