1 Star 0 Fork 17

明天/Excalidraw-mini

forked from 徐小夕/Excalidraw-mini 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setupTests.ts 622 Bytes
一键复制 编辑 原始数据 按行查看 历史
徐小夕 提交于 2024-02-22 22:45 . :new:update
// vitest.setup.ts
import "vitest-canvas-mock";
import "@testing-library/jest-dom";
import { vi } from "vitest";
import polyfill from "./packages/excalidraw/polyfill";
import { testPolyfills } from "./packages/excalidraw/tests/helpers/polyfills";
Object.assign(globalThis, testPolyfills);
require("fake-indexeddb/auto");
polyfill();
vi.mock("nanoid", () => {
return {
nanoid: vi.fn(() => "test-id"),
};
});
// ReactDOM is located inside index.tsx file
// as a result, we need a place for it to render into
const element = document.createElement("div");
element.id = "root";
document.body.appendChild(element);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pickzhu/excalidraw-mini.git
git@gitee.com:pickzhu/excalidraw-mini.git
pickzhu
excalidraw-mini
Excalidraw-mini
master

搜索帮助