This commit is contained in:
@@ -21,6 +21,8 @@ import {
|
||||
RemoteUserMediaViewModel,
|
||||
} from "../state/MediaViewModel";
|
||||
import { E2eeType } from "../e2ee/e2eeType";
|
||||
import { DEFAULT_CONFIG, ResolvedConfigOptions } from "../config/ConfigOptions";
|
||||
import { Config } from "../config/Config";
|
||||
|
||||
export function withFakeTimers(continuation: () => void): void {
|
||||
vi.useFakeTimers();
|
||||
@@ -197,3 +199,10 @@ export async function withRemoteMedia(
|
||||
vm.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
export function mockConfig(config: Partial<ResolvedConfigOptions> = {}): void {
|
||||
vi.spyOn(Config, "get").mockReturnValue({
|
||||
...DEFAULT_CONFIG,
|
||||
...config,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user