Add files

This commit is contained in:
2025-01-24 06:58:00 +01:00
parent f184f37410
commit 4712f878b9
186 changed files with 40911 additions and 0 deletions

18
test/mocks.js Normal file
View File

@ -0,0 +1,18 @@
const electron = require('electron')
const config = require('./config')
console.log('Mocking electron.dialog.showOpenDialogSync...')
electron.dialog.showOpenDialogSync = showOpenDialogSync
function showOpenDialogSync (win, opts) {
return /select.*torrent file/i.test(opts.title)
? config.TORRENT_FILES
: config.SEED_FILES
}
console.log('Mocking electron.dialog.showSaveDialogSync...')
electron.dialog.showSaveDialogSync = showSaveDialogSync
function showSaveDialogSync (win, opts) {
return config.SAVED_TORRENT_FILE
}