You've already forked matrix-js-sdk
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:
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user