update vite vitest and rollup
(rollup needs updating to fix a security alert)
This commit is contained in:
@@ -30,7 +30,13 @@ import {
|
||||
} from "../utils/test";
|
||||
import { initializeWidget } from "../widget";
|
||||
initializeWidget();
|
||||
export const TestAudioContextConstructor = vi.fn(() => testAudioContext);
|
||||
export const TestAudioContextConstructor = vi.fn(
|
||||
class {
|
||||
public constructor() {
|
||||
return testAudioContext;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
const MediaDevicesProvider = MediaDevicesContext.MediaDevicesContext.Provider;
|
||||
|
||||
|
||||
@@ -90,11 +90,18 @@ export const testAudioContext = {
|
||||
createStereoPanner: vi.fn().mockReturnValue(panNode),
|
||||
close: vi.fn().mockResolvedValue(undefined),
|
||||
};
|
||||
export const TestAudioContextConstructor = vi.fn(() => testAudioContext);
|
||||
|
||||
const TestAudioContext = vi.fn(
|
||||
class {
|
||||
public constructor() {
|
||||
return testAudioContext;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
let user: UserEvent;
|
||||
beforeEach(() => {
|
||||
vi.stubGlobal("AudioContext", TestAudioContextConstructor);
|
||||
vi.stubGlobal("AudioContext", TestAudioContext);
|
||||
user = userEvent.setup();
|
||||
});
|
||||
|
||||
|
||||
@@ -443,10 +443,10 @@ export class MockRTCSession extends TypedEventEmitter<
|
||||
public asMockedSession(): MockedObject<MatrixRTCSession> {
|
||||
const session = this as unknown as MockedObject<MatrixRTCSession>;
|
||||
|
||||
vi.mocked(session).reemitEncryptionKeys = vi
|
||||
session.reemitEncryptionKeys = vi
|
||||
.fn<() => void>()
|
||||
.mockReturnValue(undefined);
|
||||
vi.mocked(session).getOldestMembership = vi
|
||||
session.getOldestMembership = vi
|
||||
.fn<() => CallMembership | undefined>()
|
||||
.mockReturnValue(this.memberships[0]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user