electron/spec/api-system-preferences-spec.js

22 строки
664 B
JavaScript
Исходник Обычный вид История

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