mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Pass the version info through the event
This commit is contained in:
parent
3a5c827162
commit
c9293e7733
@ -42,10 +42,13 @@ fdescribe('AutoUpdateManager (renderer)', () => {
|
||||
it('subscribes to "did-complete-downloading-update" event', () => {
|
||||
const spy = jasmine.createSpy('spy')
|
||||
autoUpdateManager.onDidCompleteDownload(spy)
|
||||
electronAutoUpdater.emit('update-downloaded', null, null, {releaseVersion: '1.2.3'})
|
||||
electronAutoUpdater.emit('update-downloaded', null, null, '1.2.3')
|
||||
waitsFor(() => {
|
||||
return spy.callCount === 1
|
||||
})
|
||||
runs(() => {
|
||||
expect(spy.mostRecentCall.args[0].releaseVersion).toBe('1.2.3')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -72,7 +75,7 @@ fdescribe('AutoUpdateManager (renderer)', () => {
|
||||
autoUpdateManager.onUpdateNotAvailable(spy)
|
||||
electronAutoUpdater.emit('checking-for-update')
|
||||
electronAutoUpdater.emit('update-available')
|
||||
electronAutoUpdater.emit('update-downloaded', null, null, {releaseVersion: '1.2.3'})
|
||||
electronAutoUpdater.emit('update-downloaded', null, null, '1.2.3')
|
||||
electronAutoUpdater.emit('update-not-available')
|
||||
|
||||
waitsFor(() => {
|
||||
|
@ -17,8 +17,8 @@ export default class AutoUpdateManager {
|
||||
updateEventEmitter.onDidBeginCheckingForUpdate(() => {
|
||||
this.emitter.emit('did-begin-checking-for-update')
|
||||
}),
|
||||
updateEventEmitter.onDidCompleteDownloadingUpdate(() => {
|
||||
this.emitter.emit('did-complete-downloading-update')
|
||||
updateEventEmitter.onDidCompleteDownloadingUpdate((details) => {
|
||||
this.emitter.emit('did-complete-downloading-update', details)
|
||||
}),
|
||||
updateEventEmitter.onUpdateNotAvailable(() => {
|
||||
this.emitter.emit('update-not-available')
|
||||
|
Loading…
Reference in New Issue
Block a user