mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 22:09:55 +00:00
* Change vite output to ES2022 * Add whitespace-only minify using default esbuild Does not work for .es.js output - limitation of vite. Workaround for .es.js involves adding terser & a plugin. * Remove @ts-expect-error from tests * Update vite.config.mts --------- Co-authored-by: Chenlei Hu <huchenlei@proton.me>
12 lines
348 B
TypeScript
12 lines
348 B
TypeScript
import {
|
|
LGraphNode,
|
|
} from "../dist/litegraph.es.js";
|
|
|
|
describe("LGraphNode", () => {
|
|
it("should serialize position correctly", () => {
|
|
const node = new LGraphNode("TestNode");
|
|
node.pos = [10, 10];
|
|
expect(node.pos).toEqual(new Float32Array([10, 10]));
|
|
expect(node.serialize().pos).toEqual(new Float32Array([10, 10]));
|
|
});
|
|
}); |