-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Remove IPC listener on timeout. And goodbye jasmime, electron-ava to the rescue. Fixes #161 * better naming and documentation #161
- Loading branch information
1 parent
a7ae6f7
commit a7ba6d3
Showing
9 changed files
with
60 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { test } from 'ava' | ||
|
||
import electron from 'electron' | ||
|
||
import ExportJob from '../lib/exportJob' | ||
|
||
const args = {} | ||
const options = { | ||
pageSize: 'Letter' | ||
} | ||
let job = new ExportJob(['input'], 'output.pdf', args, options) | ||
|
||
// Ready Event, wait times | ||
test('_readyEventTimeout removes ipc listener', t => { | ||
const generateFunction = () => {} | ||
const ipcListener = job._attachIPCListener('myEvent', generateFunction) | ||
t.is(electron.ipcMain.listenerCount('READY_TO_RENDER'), 1) | ||
job._cancelReadyEvent('myEvent', ipcListener, generateFunction) | ||
t.is(electron.ipcMain.listenerCount('READY_TO_RENDER'), 0) | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.