fix: split renderScene so that locales aren't imported unnecessarily (#7718)

* fix: split renderScene so that locales aren't imported unnecessarily

* lint

* split export code

* rename renderScene to helpers.ts

* add helpers

* fix typo

* fixes

* move renderElementToSvg to export

* lint

* rename export to staticSvgScene

* fix
This commit is contained in:
Aakansha Doshi 2024-02-27 10:37:44 +05:30 committed by GitHub
parent dd8529743a
commit b09b5cb5f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1528 additions and 1480 deletions

View file

@ -12,7 +12,7 @@ import {
togglePopover,
} from "./test-utils";
import { Excalidraw } from "../index";
import * as Renderer from "../renderer/renderScene";
import * as StaticScene from "../renderer/staticScene";
import { reseed } from "../random";
import { UI, Pointer, Keyboard } from "./helpers/ui";
import { KEYS } from "../keys";
@ -39,7 +39,7 @@ const mouse = new Pointer("mouse");
// Unmount ReactDOM from root
ReactDOM.unmountComponentAtNode(document.getElementById("root")!);
const renderStaticScene = vi.spyOn(Renderer, "renderStaticScene");
const renderStaticScene = vi.spyOn(StaticScene, "renderStaticScene");
beforeEach(() => {
localStorage.clear();
renderStaticScene.mockClear();