feat(packages/excalidraw): export throttleRAF (#10912)

This commit is contained in:
David Luzar
2026-03-07 12:05:33 +01:00
committed by GitHub
parent 3d8c12fba4
commit fa1f7d9f22
6 changed files with 123 additions and 5 deletions
+10
View File
@@ -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();