mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-31 07:00:26 +00:00
lint
This commit is contained in:
@@ -48,10 +48,10 @@ export function ReactionsAudioRenderer(): ReactNode {
|
||||
return;
|
||||
}
|
||||
if (SoundMap[reactionName]) {
|
||||
audioEngineRef.current.playSound(reactionName);
|
||||
void audioEngineRef.current.playSound(reactionName);
|
||||
} else {
|
||||
// Fallback sounds.
|
||||
audioEngineRef.current.playSound("generic");
|
||||
void audioEngineRef.current.playSound("generic");
|
||||
}
|
||||
}
|
||||
}, [audioEngineRef, shouldPlay, oldReactions, reactions]);
|
||||
|
||||
@@ -27,9 +27,11 @@ const TestComponent: FC = () => {
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<button onClick={async () => audioCtx.playSound("aSound")}>Valid sound</button>
|
||||
<button onClick={() => void audioCtx.playSound("aSound")}>
|
||||
Valid sound
|
||||
</button>
|
||||
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/}
|
||||
<button onClick={async () => audioCtx.playSound("not-valid" as any)}>
|
||||
<button onClick={() => void audioCtx.playSound("not-valid" as any)}>
|
||||
Invalid sound
|
||||
</button>
|
||||
</>
|
||||
@@ -59,6 +61,7 @@ class MockAudioContext {
|
||||
vitest.mocked({
|
||||
connect: (v: unknown) => v,
|
||||
start: () => {},
|
||||
addEventListener: (_eventType: string, cb: () => void) => cb(),
|
||||
}),
|
||||
);
|
||||
public createGain = vitest.fn().mockReturnValue(this.gain);
|
||||
|
||||
Reference in New Issue
Block a user