-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathdaemon-client.ts
More file actions
19 lines (17 loc) · 1.11 KB
/
daemon-client.ts
File metadata and controls
19 lines (17 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { vi } from 'vitest';
export const connectToDaemon = vi.fn().mockResolvedValue( undefined );
export const disconnectFromDaemon = vi.fn().mockResolvedValue( undefined );
export const emitCliEvent = vi.fn().mockResolvedValue( undefined );
export const killDaemonAndChildren = vi.fn().mockResolvedValue( undefined );
export const listProcesses = vi.fn().mockResolvedValue( [] );
export const getDaemonBus = vi.fn().mockResolvedValue( {} );
export const sendMessageToProcess = vi.fn().mockResolvedValue( undefined );
export const startProcess = vi.fn().mockResolvedValue( {} );
export const stopProcess = vi.fn().mockResolvedValue( undefined );
export const deleteProcess = vi.fn().mockResolvedValue( undefined );
export const restartProcess = vi.fn().mockResolvedValue( {} );
export const getProcessByName = vi.fn().mockResolvedValue( undefined );
export const subscribeSiteEvents = vi.fn().mockResolvedValue( undefined );
export const subscribeDaemonKillEvent = vi.fn().mockResolvedValue( undefined );
export const isProcessRunning = vi.fn().mockResolvedValue( false );
export const SITE_EVENTS_SOCKET_PATH = '/test/events.sock';