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:
filtered
2024-11-07 09:27:32 +11:00
committed by GitHub
parent 93c26ac99e
commit 7e21b00cc7
17 changed files with 1179 additions and 4067 deletions

View File

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