mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Only notify when changed key path is really sub path of observed path
Closes #3775
This commit is contained in:
@@ -340,6 +340,14 @@ describe "Config", ->
|
||||
atom.config.set('foo.bar.baz', "value 2")
|
||||
expect(observeHandler).not.toHaveBeenCalled()
|
||||
|
||||
it 'does not fire the callback for a similarly named keyPath', ->
|
||||
bazCatHandler = jasmine.createSpy("bazCatHandler")
|
||||
observeSubscription = atom.config.observe "foo.bar.bazCat", bazCatHandler
|
||||
|
||||
bazCatHandler.reset()
|
||||
atom.config.set('foo.bar.baz', "value 10")
|
||||
expect(bazCatHandler).not.toHaveBeenCalled()
|
||||
|
||||
describe ".initializeConfigDirectory()", ->
|
||||
beforeEach ->
|
||||
if fs.existsSync(dotAtomPath)
|
||||
|
||||
Reference in New Issue
Block a user