mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 13:59:54 +00:00
* ContextMenu ES6 class conversion * Fix compat with extensions * CurveEditor ES6 class conversion * Split most of the LiteGraph global out to a class * Move remainder of LiteGraph global to class file * Remove IIFE wrapper * Fix jest tests throwing due to type narrowing
14 lines
449 B
TypeScript
14 lines
449 B
TypeScript
import {
|
|
LGraphNode,
|
|
} from "../dist/litegraph.es.js";
|
|
|
|
describe("LGraphNode", () => {
|
|
it("should serialize position correctly", () => {
|
|
const node = new LGraphNode("TestNode");
|
|
// @ts-expect-error Expected - not a TS class yet.
|
|
node.pos = [10, 10];
|
|
// @ts-expect-error JS tests in TS format
|
|
expect(node.pos).toEqual(new Float32Array([10, 10]));
|
|
expect(node.serialize().pos).toEqual(new Float32Array([10, 10]));
|
|
});
|
|
}); |