feat(packages/excalidraw): export throttleRAF (#10912)
This commit is contained in:
@@ -6,9 +6,19 @@ import "@testing-library/jest-dom";
|
||||
import { vi } from "vitest";
|
||||
|
||||
import polyfill from "./packages/excalidraw/polyfill";
|
||||
import { mockThrottleRAF } from "./packages/excalidraw/tests/helpers/mocks";
|
||||
import { yellow } from "./packages/excalidraw/tests/helpers/colorize";
|
||||
import { testPolyfills } from "./packages/excalidraw/tests/helpers/polyfills";
|
||||
|
||||
vi.mock("@excalidraw/common", async (importOriginal) => {
|
||||
const module = await importOriginal<typeof import("@excalidraw/common")>();
|
||||
|
||||
return {
|
||||
...module,
|
||||
throttleRAF: mockThrottleRAF,
|
||||
};
|
||||
});
|
||||
|
||||
// mock for pep.js not working with setPointerCapture()
|
||||
HTMLElement.prototype.setPointerCapture = vi.fn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user