mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 10:44:12 +00:00
Replace test framework: jest -> vitest (#281)
* Replace test framework: jest -> vitest * nit - remove deprecated npm scripts * Add vitest config * Add a few basic tests * Update actions with vitest params * Add correct expectations * Remove jest config
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
LGraphNode,
|
||||
} from "../src/litegraph"
|
||||
import { describe, expect } from "vitest"
|
||||
import { LGraphNode } from "@/litegraph"
|
||||
import { lgTest } from "./lgTest"
|
||||
|
||||
describe("LGraphNode", () => {
|
||||
it("should serialize position/size correctly", () => {
|
||||
lgTest("should serialize position/size correctly", () => {
|
||||
const node = new LGraphNode("TestNode")
|
||||
node.pos = [10, 10]
|
||||
expect(node.pos).toEqual(new Float32Array([10, 10]))
|
||||
@@ -13,4 +13,4 @@ describe("LGraphNode", () => {
|
||||
expect(node.size).toEqual(new Float32Array([100, 100]))
|
||||
expect(node.serialize().size).toEqual([100, 100])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user