1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-31 15:24:23 +03:00

Add MatrixClient group call tests (#2692)

Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
Šimon Brandner
2022-09-23 18:33:31 +02:00
committed by GitHub
parent 4625ed73cf
commit a2981efac3
2 changed files with 124 additions and 0 deletions

View File

@ -1714,4 +1714,39 @@ describe("MatrixClient", function() {
expect(newSourceRoom._state.get(PolicyScope.User)?.[eventId]).toBeFalsy();
});
});
describe("using E2EE in group calls", () => {
const opts = {
baseUrl: "https://my.home.server",
idBaseUrl: identityServerUrl,
accessToken: "my.access.token",
store: store,
scheduler: scheduler,
userId: userId,
};
it("enables E2EE by default", () => {
const client = new MatrixClient(opts);
expect(client.getUseE2eForGroupCall()).toBe(true);
});
it("enables E2EE when enabled explicitly", () => {
const client = new MatrixClient({
useE2eForGroupCall: true,
...opts,
});
expect(client.getUseE2eForGroupCall()).toBe(true);
});
it("disables E2EE if disabled explicitly", () => {
const client = new MatrixClient({
useE2eForGroupCall: false,
...opts,
});
expect(client.getUseE2eForGroupCall()).toBe(false);
});
});
});