Skip to content

Commit

Permalink
Fix imports and update spy function
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir-Thom committed Dec 28, 2023
1 parent b613320 commit 0d149d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/setting.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import Setting from "../src/views/Settings";
import React from "react";
import { MemoryRouter } from "react-router-dom";
import { randomFillSync } from "crypto";
import { e } from "vitest/dist/reporters-OH1c16Kq";

import { ISettings } from "../src/interfaces/IServer";
import { spyOn } from "@vitest/spy";

describe("Setting Component", () => {
const titlebarContainer = document.createElement("div");
Expand Down Expand Up @@ -229,7 +230,7 @@ describe("Setting Component", () => {
</MemoryRouter>
);
invoke("patch_server_request", {url:"http://127.0.0.1:9997/v3/config/global/patch"});
vi.spyOn(window, "__TAURI_IPC__");
spyOn(window, "__TAURI_IPC__" as any);
expect(invoke("patch_server_request")).resolves.all;


Expand Down

0 comments on commit 0d149d9

Please sign in to comment.