diff --git a/resources/js/electron-plugin/tests/api.test.ts b/resources/js/electron-plugin/tests/api.test.ts index ce4959cc..3abe8b85 100644 --- a/resources/js/electron-plugin/tests/api.test.ts +++ b/resources/js/electron-plugin/tests/api.test.ts @@ -2,13 +2,18 @@ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; import startAPIServer, { APIProcess } from "../src/server/api"; import axios from "axios"; -vi.mock('electron-updater', () => ({ - autoUpdater: { - checkForUpdates: vi.fn(), - quitAndInstall: vi.fn(), - addListener: vi.fn(), - }, -})); +vi.mock('electron-updater', () => { + return { + default: { + autoUpdater: { + checkForUpdates: vi.fn(), + quitAndInstall: vi.fn(), + addListener: vi.fn(), + downloadUpdate: vi.fn(), + }, + }, + }; +}); let apiServer: APIProcess;