mirror of
https://github.com/vector-im/element-call.git
synced 2026-10-16 23:45:50 +00:00
Reduce ConnectionManager to a ConnectionMap
createConnectionMap$ now returns the behavior of connections and their participants directly and takes an already resolved local transport instead of an observable of it. The CallViewModel wraps it with mapScoped so that a new map is built, in a fresh scope, whenever the local transport changes, and swallows local transport errors there since the local member already surfaces them in the UI.
This commit is contained in:
@@ -418,8 +418,8 @@ describe("Start connection states", () => {
|
||||
pendingConnect.reject(new Error("Client initiated disconnect"));
|
||||
await stopping;
|
||||
|
||||
// start() resolves rather than rejecting (it is not awaited by the
|
||||
// ConnectionManager, so a rejection would be unhandled).
|
||||
// start() resolves rather than rejecting (it is not awaited by the caller,
|
||||
// so a rejection would be unhandled).
|
||||
await expect(started).resolves.toBeUndefined();
|
||||
expect(capturedStates.at(-1)).toEqual({ state: "stopped" });
|
||||
expect(capturedStates.some((st) => st instanceof Error)).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user