1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

Fix regressions around media uploads failing and causing soft crashes (#9549)

This commit is contained in:
Michael Telatynski
2022-11-07 11:56:43 +00:00
committed by GitHub
parent be5a8ca3b9
commit 77764d80bc
6 changed files with 17 additions and 218 deletions

View File

@ -232,6 +232,15 @@ describe("Notifier", () => {
});
});
describe("getSoundForRoom", () => {
it("should not explode if given invalid url", () => {
jest.spyOn(SettingsStore, "getValue").mockImplementation((name: string) => {
return { url: { content_uri: "foobar" } };
});
expect(Notifier.getSoundForRoom("!roomId:server")).toBeNull();
});
});
describe("_playAudioNotification", () => {
it.each([
{ event: { is_silenced: true }, count: 0 },