add fail spec and only run mac ci
This commit is contained in:
parent
becabdfff2
commit
8a24733ee6
1 changed files with 12 additions and 0 deletions
|
@ -36,6 +36,10 @@ describe('systemPreferences module', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('systemPreferences.registerDefaults(defaults)', () => {
|
describe('systemPreferences.registerDefaults(defaults)', () => {
|
||||||
|
before(function () {
|
||||||
|
if (process.platform !== 'darwin') this.skip()
|
||||||
|
})
|
||||||
|
|
||||||
it('registers defaults', () => {
|
it('registers defaults', () => {
|
||||||
const userDefaults = {
|
const userDefaults = {
|
||||||
'one': 'onee',
|
'one': 'onee',
|
||||||
|
@ -50,6 +54,14 @@ describe('systemPreferences module', () => {
|
||||||
const val = systemPreferences.getUserDefault('two', 'string')
|
const val = systemPreferences.getUserDefault('two', 'string')
|
||||||
assert.equal(val, 'twoo')
|
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)', () => {
|
describe('systemPreferences.getUserDefault(key, type)', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue