mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Add specs for setting with an object
This commit is contained in:
parent
c480080dd2
commit
fc899f54cf
@ -1309,6 +1309,10 @@ describe "Config", ->
|
||||
expect(atom.config.get('foo.bar.aColor')).toEqual {red: 0, green: 255, blue: 0, alpha: 1}
|
||||
atom.config.set('foo.bar.aColor', 'hsla(120,100%,50%,0.3)')
|
||||
expect(atom.config.get('foo.bar.aColor')).toEqual {red: 0, green: 255, blue: 0, alpha: .3}
|
||||
atom.config.set('foo.bar.aColor', {red: 100, green: 255, blue: 2, alpha: .5})
|
||||
expect(atom.config.get('foo.bar.aColor')).toEqual {red: 100, green: 255, blue: 2, alpha: .5}
|
||||
atom.config.set('foo.bar.aColor', {red: 255})
|
||||
expect(atom.config.get('foo.bar.aColor')).toEqual {red: 255, green: 0, blue: 0, alpha: 1}
|
||||
|
||||
it 'reverts back to the default value when undefined is passed to set', ->
|
||||
atom.config.set('foo.bar.aColor', 'rgb(255,255,255)')
|
||||
|
Loading…
Reference in New Issue
Block a user