Skip to content

Commit b9cffcb

Browse files
committed
Move from using jest to vitest in pvws test
1 parent 1c19650 commit b9cffcb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/connection/pvws.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import { PvwsPlugin } from "./pvws";
22
import WS from "vitest-websocket-mock";
33
import { DType } from "../types/dtypes";
4+
import { vi, describe, beforeEach, afterEach, it, Mock } from "vitest";
45

56
describe("PvwsPlugin", (): void => {
67
let cp: PvwsPlugin;
7-
let mockConnUpdate: jest.Mock;
8-
let mockValUpdate: jest.Mock;
8+
let mockConnUpdate: Mock;
9+
let mockValUpdate: Mock;
910
let ws: WS;
1011
beforeEach(async () => {
1112
ws = new WS("ws://a.b.c:100/pvws/pv");
1213
cp = new PvwsPlugin("a.b.c:100", false);
13-
mockConnUpdate = jest.fn();
14-
mockValUpdate = jest.fn();
14+
mockConnUpdate = vi.fn();
15+
mockValUpdate = vi.fn();
1516
cp.connect(mockConnUpdate, mockValUpdate);
1617
await ws.connected;
1718
});

0 commit comments

Comments
 (0)