Files
ComfyUI_frontend/test/LGraphNode.test.ts
Chenlei Hu 28382b7e45 Format all code with prettier (#197)
* Add formatter support

* Format all code

* Fix moved @ts-expect-error
2024-10-07 14:06:44 -04:00

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