Files
ComfyUI_frontend/test/LGraphNode.test.ts
filtered edfa5e70f2 ES2022 Output & whitespace-only minification (#201)
* 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>
2024-10-10 21:00:45 -04:00

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]));
});
});