How to use the electron-mock-ipc function in electron-mock-ipc

To help you get started, we’ve selected a few electron-mock-ipc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github h3poteto / whalebird-desktop / spec / mock / electron.ts View on Github external
import createIPCMock from 'electron-mock-ipc'
import { IpcRenderer, IpcMain } from 'electron'

const mocked = createIPCMock()
const ipcMain = mocked.ipcMain as IpcMain
const ipcRenderer = mocked.ipcRenderer as IpcRenderer

export { ipcMain, ipcRenderer }


Mock Electron's ipcMain and ipcRenderer

Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Popular electron-mock-ipc functions