{"id":17238063,"url":"https://github.com/jsantell/electron-ipc-mock","last_synced_at":"2025-09-11T14:06:58.234Z","repository":{"id":57221679,"uuid":"56725170","full_name":"jsantell/electron-ipc-mock","owner":"jsantell","description":"Mock channels for Electron's IPC communication","archived":false,"fork":false,"pushed_at":"2017-07-04T22:45:47.000Z","size":10,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-01T00:51:28.306Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsantell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-20T22:30:22.000Z","updated_at":"2022-03-11T22:01:40.000Z","dependencies_parsed_at":"2022-08-29T04:10:06.899Z","dependency_job_id":null,"html_url":"https://github.com/jsantell/electron-ipc-mock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsantell%2Felectron-ipc-mock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsantell%2Felectron-ipc-mock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsantell%2Felectron-ipc-mock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsantell%2Felectron-ipc-mock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsantell","download_url":"https://codeload.github.com/jsantell/electron-ipc-mock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223614750,"owners_count":17173666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T05:44:35.163Z","updated_at":"2024-11-08T01:27:19.932Z","avatar_url":"https://github.com/jsantell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"electron-ipc-mock\n=======\n\n[![Build Status](http://img.shields.io/travis/jsantell/electron-ipc-mock.svg?style=flat-square)](https://travis-ci.org/jsantell/electron-ipc-mock)\n[![Build Status](http://img.shields.io/npm/v/electron-ipc-mock.svg?style=flat-square)](https://www.npmjs.org/package/electron-ipc-mock)\n\nMock Communication for Electron's IPC\n\nAn API mimicking [Electron's](http://electron.atom.io/docs/latest/api/ipc-renderer/) [ipcMain](http://electron.atom.io/docs/latest/api/ipc-main/) and [ipcRenderer](http://electron.atom.io/docs/latest/api/ipc-renderer/). Swap out electron calls in your code in tests to access both mock renderer and main process IPC communication calls.\n\n## Install\n\n```\nnpm install electron-ipc-mock\n```\n\n## Usage\n\n```js\nconst { ipcRenderer, ipcMain } = require('electron-ipc-mock')();\n\nipcMain.on('request', function (e, ...args) {\n  console.log(args[0]); // 'hello'\n  e.sender.send('response', 'world');\n});\n\nipcRenderer.on('response', function (e, ...args) {\n  console.log(args[0]); // 'world'\n});\n\nipcRenderer.send('request', 'hello')\n```\n\n## Testing\n\n```\nnpm test\n```\n\n## License\n\nMIT License, Copyright (c) 2016 Jordan Santell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsantell%2Felectron-ipc-mock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsantell%2Felectron-ipc-mock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsantell%2Felectron-ipc-mock/lists"}