review: fix mock import module

This commit is contained in:
Valere
2025-12-02 17:43:58 +01:00
parent 7f3596845c
commit be0c7eb365

View File

@@ -20,10 +20,9 @@ import type { ProcessorState } from "../../../livekit/TrackProcessorContext.tsx"
import { constant } from "../../Behavior";
// At the top of your test file, after imports
vi.mock("livekit-client", async () => {
const actual = await vi.importActual("livekit-client");
vi.mock("livekit-client", async (importOriginal) => {
return {
...actual,
...(await importOriginal()),
Room: vi.fn().mockImplementation(function (this: LivekitRoom, options) {
const emitter = new EventEmitter();
return {