Add basic spec for getAccentColor

This commit is contained in:
Samuel Attard 2016-09-17 02:13:09 +10:00
parent 1454510549
commit 9f94652792
No known key found for this signature in database
GPG key ID: 273DC1869D8F13EF

View file

@ -3,11 +3,23 @@ const {remote} = require('electron')
const {systemPreferences} = remote
describe('systemPreferences module', function () {
if (process.platform !== 'darwin') {
return
}
describe('systemPreferences.getAccentColor', function () {
if (process.platform !== 'win32') {
return
}
it('should return a non-empty string', function () {
let accentColor = systemPreferences.getAccentColor();
assert.notEqual(accentColor, null);
assert(accentColor.length > 0);
})
})
describe('systemPreferences.getUserDefault(key, type)', function () {
if (process.platform !== 'darwin') {
return
}
it('returns values for known user defaults', function () {
let locale = systemPreferences.getUserDefault('AppleLocale', 'string')
assert.notEqual(locale, null)