Integration test: add existing torrent

This commit is contained in:
DC
2016-09-13 22:19:52 -07:00
parent 62c5b78358
commit 051c1516a0
12 changed files with 72 additions and 20 deletions

9
test/mocks.js Normal file
View 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)
}