Merge pull request #953 from h3poteto/mock
Use electrom-mock-ipc instead of electron-ipc-mock
This commit is contained in:
commit
02cdb0cf78
|
@ -6725,6 +6725,23 @@
|
|||
"resolved": "https://registry.npmjs.org/electron-log/-/electron-log-2.2.17.tgz",
|
||||
"integrity": "sha512-v+Af5W5z99ehhaLOfE9eTSXUwjzh2wFlQjz51dvkZ6ZIrET6OB/zAZPvsuwT6tm3t5x+M1r+Ed3U3xtPZYAyuQ=="
|
||||
},
|
||||
"electron-mock-ipc": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/electron-mock-ipc/-/electron-mock-ipc-0.1.3.tgz",
|
||||
"integrity": "sha512-+x5v+hmZZYUi8SMJNBtcq1o2p3aUJfT3aJCEKIoajSa/6rV9EdmFOd/rHLVEH85GSlWQCf+i1yV4r4bDnfEXHw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"typescript": "^3.5.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.2.tgz",
|
||||
"integrity": "sha512-7KxJovlYhTX5RaRbUdkAXN1KUZ8PwWlTzQdHV6xNqvuFOs7+WBo10TQUqT19Q/Jz2hk5v9TQDIhyLhhJY4p5AA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"electron-osx-sign": {
|
||||
"version": "0.4.10",
|
||||
"resolved": "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.10.tgz",
|
||||
|
|
|
@ -235,6 +235,7 @@
|
|||
"electron-debug": "^2.2.0",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"electron-ipc-mock": "0.0.3",
|
||||
"electron-mock-ipc": "^0.1.3",
|
||||
"electron-packager": "^12.2.0",
|
||||
"eslint": "^5.9.0",
|
||||
"eslint-config-prettier": "^4.1.0",
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import mock from 'electron-ipc-mock'
|
||||
import createIPCMock from 'electron-mock-ipc'
|
||||
|
||||
const mocked = createIPCMock()
|
||||
const ipcMain = mocked.ipcMain
|
||||
const ipcRenderer = mocked.ipcRenderer
|
||||
|
||||
const instance = mock()
|
||||
const ipcMain = instance.ipcMain
|
||||
const ipcRenderer = instance.ipcRenderer
|
||||
export { ipcMain, ipcRenderer }
|
||||
|
|
Loading…
Reference in New Issue