16 lines
447 B
TypeScript
16 lines
447 B
TypeScript
// Mock requestAnimationFrame
|
|
global.requestAnimationFrame = (callback) => {
|
|
return setTimeout(callback, 0);
|
|
};
|
|
|
|
global.cancelAnimationFrame = (id) => {
|
|
clearTimeout(id);
|
|
};
|
|
|
|
// Mock URL.createObjectURL and URL.revokeObjectURL
|
|
const mockCreateObjectURL = jest.fn(() => `blob:test-video-${Date.now()}`);
|
|
const mockRevokeObjectURL = jest.fn();
|
|
|
|
global.URL.createObjectURL = mockCreateObjectURL;
|
|
global.URL.revokeObjectURL = mockRevokeObjectURL;
|