Add basic spec for getAccentColor
This commit is contained in:
parent
1454510549
commit
9f94652792
1 changed files with 15 additions and 3 deletions
|
@ -3,11 +3,23 @@ const {remote} = require('electron')
|
||||||
const {systemPreferences} = remote
|
const {systemPreferences} = remote
|
||||||
|
|
||||||
describe('systemPreferences module', function () {
|
describe('systemPreferences module', function () {
|
||||||
if (process.platform !== 'darwin') {
|
describe('systemPreferences.getAccentColor', function () {
|
||||||
return
|
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 () {
|
describe('systemPreferences.getUserDefault(key, type)', function () {
|
||||||
|
if (process.platform !== 'darwin') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
it('returns values for known user defaults', function () {
|
it('returns values for known user defaults', function () {
|
||||||
let locale = systemPreferences.getUserDefault('AppleLocale', 'string')
|
let locale = systemPreferences.getUserDefault('AppleLocale', 'string')
|
||||||
assert.notEqual(locale, null)
|
assert.notEqual(locale, null)
|
||||||
|
|
Loading…
Reference in a new issue