mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-28 09:44:37 +00:00
Start to build out tests
This commit is contained in:
@@ -235,12 +235,3 @@ export function mockConfig(config: Partial<ResolvedConfigOptions> = {}): void {
|
||||
...config,
|
||||
});
|
||||
}
|
||||
|
||||
export function mockMediaPlay(): string[] {
|
||||
const audioIsPlaying: string[] = [];
|
||||
window.HTMLMediaElement.prototype.play = async function (): Promise<void> {
|
||||
audioIsPlaying.push((this.children[0] as HTMLSourceElement).src);
|
||||
return Promise.resolve();
|
||||
};
|
||||
return audioIsPlaying;
|
||||
}
|
||||
|
||||
@@ -203,4 +203,8 @@ export class MockRoom extends EventEmitter {
|
||||
});
|
||||
return evt.getId()!;
|
||||
}
|
||||
|
||||
public getMember() {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user