How to use electron-mock-ipc - 1 common examples

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 }

electron-mock-ipc

Mock Electron's ipcMain and ipcRenderer

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular electron-mock-ipc functions