mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-01 09:54:37 +00:00
fix tests after moving to pnpm
This commit is contained in:
@@ -74,7 +74,26 @@ const panNode = vi.mocked(
|
||||
* It can also be used to mock the `AudioContext` constructor in tests:
|
||||
* `vi.stubGlobal("AudioContext", () => testAudioContext);`
|
||||
*/
|
||||
export const testAudioContext = {
|
||||
export const testAudioContext: Partial<AudioContext> & {
|
||||
gain: ReturnType<
|
||||
typeof vi.mocked<{
|
||||
connect: (node: AudioNode) => AudioNode;
|
||||
gain: { setValueAtTime: ReturnType<typeof vi.fn>; value: number };
|
||||
}>
|
||||
>;
|
||||
pan: ReturnType<
|
||||
typeof vi.mocked<{
|
||||
connect: (node: AudioNode) => AudioNode;
|
||||
pan: { setValueAtTime: ReturnType<typeof vi.fn>; value: number };
|
||||
}>
|
||||
>;
|
||||
setSinkId: ReturnType<typeof vi.fn>;
|
||||
decodeAudioData: ReturnType<typeof vi.fn>;
|
||||
createBufferSource: ReturnType<typeof vi.fn>;
|
||||
createGain: ReturnType<typeof vi.fn>;
|
||||
createStereoPanner: ReturnType<typeof vi.fn>;
|
||||
close: ReturnType<typeof vi.fn>;
|
||||
} = {
|
||||
gain: gainNode,
|
||||
pan: panNode,
|
||||
setSinkId: vi.fn().mockResolvedValue(undefined),
|
||||
|
||||
Reference in New Issue
Block a user