mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 07:28:08 +03:00
refactor inline assignments
This commit is contained in:
parent
9bc43bda9b
commit
b3d1907594
@ -1169,8 +1169,8 @@ describe('Config', () => {
|
||||
})
|
||||
|
||||
it('does not fire a change event for paths that did not change', () => {
|
||||
let noChangeSpy
|
||||
atom.config.onDidChange('foo.bar', (noChangeSpy = jasmine.createSpy('unchanged')))
|
||||
const noChangeSpy = jasmine.createSpy('unchanged')
|
||||
atom.config.onDidChange('foo.bar', (noChangeSpy))
|
||||
|
||||
writeConfigFile("foo: { bar: 'baz', baz: 'ok'}", 2)
|
||||
waitsFor('update event', () => updatedHandler.callCount > 0)
|
||||
@ -1297,7 +1297,8 @@ describe('Config', () => {
|
||||
describe('when the config file changes to contain invalid cson', () => {
|
||||
let addErrorHandler = null
|
||||
beforeEach(() => {
|
||||
atom.notifications.onDidAddNotification(addErrorHandler = jasmine.createSpy('error handler'))
|
||||
addErrorHandler = jasmine.createSpy('error handler')
|
||||
atom.notifications.onDidAddNotification(addErrorHandler)
|
||||
writeConfigFile('}}}', 4)
|
||||
waitsFor('error to be logged', () => addErrorHandler.callCount > 0)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user