Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rokt33r committed May 4, 2021
1 parent a4253d6 commit 449a625
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"transform": {
"^.+\\.tsx?$": "ts-jest"
}
},
"setupFiles": ["<rootDir>/test/setup.js"]
}
36 changes: 36 additions & 0 deletions test/setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
function dummy() {
// Don't do anything
}

window.__ELECTRON_ONLY__ = {
readFile: dummy,
readdir: dummy,
writeFile: dummy,
unlinkFile: dummy,
stat: dummy,
mkdir: dummy,
readFileType: dummy,
readFileTypeFromBuffer: dummy,
showOpenDialog: dummy,
showSaveDialog: dummy,
openExternal: dummy,
parseCSON: dummy,
stringifyCSON: dummy,
openNewWindow: dummy,
openContextMenu: dummy,
getPathByName: dummy,
addIpcListener: dummy,
sendIpcMessage: dummy,
removeIpcListener: dummy,
removeAllIpcListeners: dummy,
setAsDefaultProtocolClient: dummy,
removeAsDefaultProtocolClient: dummy,
isDefaultProtocolClient: dummy,
getWebContentsById: dummy,
setTrafficLightPosition: dummy,
convertHtmlStringToPdfBuffer: dummy,
setCookie: dummy,
getCookie: dummy,
removeCookie: dummy,
got: dummy,
}

0 comments on commit 449a625

Please sign in to comment.