Fix integration tests

This commit is contained in:
Julen Garcia Leunda
2019-11-28 17:13:37 +01:00
committed by GitHub
parent d738021285
commit 83dd5e35a7

View File

@@ -4,9 +4,6 @@ const config = require('./config')
console.log('Mocking electron.dialog.showOpenDialogSync...')
electron.dialog.showOpenDialogSync = showOpenDialogSync
console.log('Mocking electron.remote.dialog.showOpenDialogSync...')
electron.remote.dialog.showOpenDialogSync = showOpenDialogSync
function showOpenDialogSync (win, opts) {
return /select.*torrent file/i.test(opts.title)
? config.TORRENT_FILES
@@ -16,9 +13,6 @@ function showOpenDialogSync (win, opts) {
console.log('Mocking electron.dialog.showSaveDialogSync...')
electron.dialog.showSaveDialogSync = showSaveDialogSync
console.log('Mocking electron.remote.dialog.showSaveDialogSync...')
electron.remote.dialog.showSaveDialogSync = showSaveDialogSync
function showSaveDialogSync (win, opts) {
return config.SAVED_TORRENT_FILE
}