mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Rename dispose -> destroy
This commit is contained in:
@@ -14,7 +14,7 @@ describe('AutoUpdateManager (renderer)', () => {
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
autoUpdateManager.dispose()
|
||||
autoUpdateManager.destroy()
|
||||
})
|
||||
|
||||
describe('::onDidBeginCheckingForUpdate', () => {
|
||||
@@ -88,8 +88,8 @@ describe('AutoUpdateManager (renderer)', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('::dispose', () => {
|
||||
it('subscribes to "update-not-available" event', () => {
|
||||
describe('::destroy', () => {
|
||||
it('unsubscribes from all events', () => {
|
||||
const spy = jasmine.createSpy('spy')
|
||||
const doneIndicator = jasmine.createSpy('spy')
|
||||
atom.applicationDelegate.onUpdateNotAvailable(doneIndicator)
|
||||
@@ -97,7 +97,7 @@ describe('AutoUpdateManager (renderer)', () => {
|
||||
autoUpdateManager.onDidBeginDownloadingUpdate(spy)
|
||||
autoUpdateManager.onDidCompleteDownloadingUpdate(spy)
|
||||
autoUpdateManager.onUpdateNotAvailable(spy)
|
||||
autoUpdateManager.dispose()
|
||||
autoUpdateManager.destroy()
|
||||
electronAutoUpdater.emit('checking-for-update')
|
||||
electronAutoUpdater.emit('update-available')
|
||||
electronAutoUpdater.emit('update-downloaded', null, null, '1.2.3')
|
||||
|
||||
@@ -338,6 +338,7 @@ class AtomEnvironment extends Model
|
||||
@commands.clear()
|
||||
@stylesElement.remove()
|
||||
@config.unobserveUserConfig()
|
||||
@autoUpdater.destroy()
|
||||
|
||||
@uninstallWindowEventHandler()
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export default class AutoUpdateManager {
|
||||
)
|
||||
}
|
||||
|
||||
dispose () {
|
||||
destroy () {
|
||||
this.subscriptions.dispose()
|
||||
this.emitter.dispose()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user