Add systemPreferences.getColor specs

This commit is contained in:
Kevin Sawicki 2016-10-10 15:06:25 -07:00
parent 663f8f4b54
commit e7bfd1c959

View file

@ -15,6 +15,22 @@ describe('systemPreferences module', function () {
})
})
describe('systemPreferences.getColor(id)', function () {
if (process.platform !== 'win32') {
return
}
it('throws an error when the id is invalid', function () {
assert.throws(function () {
systemPreferences.getColor('not-a-color')
}, /Unknown color: not-a-color/)
})
it('returns a hex RGB color string', function () {
assert.equal(/^#[0-9A-F]{6}$/i.test(systemPreferences.getColor('window')), true)
})
})
describe('systemPreferences.getUserDefault(key, type)', function () {
if (process.platform !== 'darwin') {
return