Start to build out tests

This commit is contained in:
Half-Shot
2024-12-03 17:00:42 +00:00
parent 4d5a543330
commit a5c3d5c29d
9 changed files with 257 additions and 161 deletions
-9
View File
@@ -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;
}