mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
add fail spec and only run mac ci
This commit is contained in:
@@ -36,6 +36,10 @@ describe('systemPreferences module', () => {
|
||||
})
|
||||
|
||||
describe('systemPreferences.registerDefaults(defaults)', () => {
|
||||
before(function () {
|
||||
if (process.platform !== 'darwin') this.skip()
|
||||
})
|
||||
|
||||
it('registers defaults', () => {
|
||||
const userDefaults = {
|
||||
'one': 'onee',
|
||||
@@ -50,6 +54,14 @@ describe('systemPreferences module', () => {
|
||||
const val = systemPreferences.getUserDefault('two', 'string')
|
||||
assert.equal(val, 'twoo')
|
||||
})
|
||||
|
||||
it('throws when bad defaults are passed', () => {
|
||||
const userDefaults = 1
|
||||
|
||||
assert.throws(() => {
|
||||
systemPreferences.setUserDefault(userDefaults)
|
||||
}, `Unable to parse userDefaults dict`)
|
||||
})
|
||||
})
|
||||
|
||||
describe('systemPreferences.getUserDefault(key, type)', () => {
|
||||
|
||||
Reference in New Issue
Block a user