Mock electron.ipcRenderer.on to prevent errors in React compoment test cases

Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
Hung-Han (Henry) Chen authored and Hung-Han (Henry) Chen committed 2020-11-03 18:26:17 +08:00
1 parent 592b8c20f7
commit 7a2da15828
1 file changed
+4 -1
+4 -1
View File
@@ -13,5 +13,8 @@ module.exports = {
getPath: jest.fn()
}
},
dialog: jest.fn()
dialog: jest.fn(),
ipcRenderer: {
on: jest.fn()
}
};