fix test using private field (#34618)
* fix test using private field * review: use readable name
This commit is contained in:
@@ -48,12 +48,13 @@ describe("FallbackIceServerController", () => {
|
|||||||
MatrixClientBackedController.matrixClient = client;
|
MatrixClientBackedController.matrixClient = client;
|
||||||
expect(controller.settingDisabled).toBeFalsy();
|
expect(controller.settingDisabled).toBeFalsy();
|
||||||
|
|
||||||
client["clientWellKnown"] = {
|
const wellKnown = {
|
||||||
"io.element.voip": {
|
"io.element.voip": {
|
||||||
disable_fallback_ice: true,
|
disable_fallback_ice: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
client.emit(ClientEvent.ClientWellKnown, client["clientWellKnown"]);
|
vi.spyOn(client, "getClientWellKnown").mockResolvedValue(wellKnown);
|
||||||
|
client.emit(ClientEvent.ClientWellKnown, wellKnown);
|
||||||
|
|
||||||
expect(controller.settingDisabled).toBeTruthy();
|
expect(controller.settingDisabled).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user