Integration test: add existing torrent
This commit is contained in:
9
test/mocks.js
Normal file
9
test/mocks.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const path = require('path')
|
||||
const electron = require('electron')
|
||||
|
||||
const MOCK_OPEN_TORRENTS = [path.join(__dirname, 'resources', '1.torrent')]
|
||||
|
||||
console.log('Mocking electron native integrations...')
|
||||
electron.dialog.showOpenDialog = function (win, opts, cb) {
|
||||
cb(MOCK_OPEN_TORRENTS)
|
||||
}
|
||||
Reference in New Issue
Block a user