2016-06-02 01:56:25 +00:00
|
|
|
const assert = require('assert')
|
|
|
|
const {remote} = require('electron')
|
|
|
|
const {systemPreferences} = remote
|
|
|
|
|
|
|
|
describe('systemPreferences module', function () {
|
|
|
|
if (process.platform !== 'darwin') {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2016-06-02 02:21:17 +00:00
|
|
|
it('returns values for known user defaults', function () {
|
|
|
|
let locale = systemPreferences.getUserDefault('AppleLocale', 'string')
|
2016-06-02 01:56:25 +00:00
|
|
|
assert.notEqual(locale, null)
|
|
|
|
assert(locale.length > 0)
|
|
|
|
|
2016-06-02 02:21:17 +00:00
|
|
|
let languages = systemPreferences.getUserDefault('AppleLanguages', 'array')
|
2016-06-02 01:56:25 +00:00
|
|
|
assert.notEqual(languages, null)
|
|
|
|
assert(languages.length > 0)
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|