From 9f946527929d65607c0d42d33733d370fee27f83 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Sat, 17 Sep 2016 02:13:09 +1000 Subject: [PATCH] Add basic spec for getAccentColor --- spec/api-system-preferences-spec.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/spec/api-system-preferences-spec.js b/spec/api-system-preferences-spec.js index be7009ae6bf1..80f33bddbbed 100644 --- a/spec/api-system-preferences-spec.js +++ b/spec/api-system-preferences-spec.js @@ -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)