Add specs for showCertificateTrustDialog option errors
This commit is contained in:
parent
2e32525e8f
commit
2bd47eb672
1 changed files with 16 additions and 0 deletions
|
@ -93,4 +93,20 @@ describe('dialog module', () => {
|
||||||
}, /Error processing argument at index 1/)
|
}, /Error processing argument at index 1/)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('showCertificateTrustDialog', () => {
|
||||||
|
it('throws errors when the options are invalid', () => {
|
||||||
|
assert.throws(() => {
|
||||||
|
dialog.showCertificateTrustDialog()
|
||||||
|
}, /options must be an object/)
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
dialog.showCertificateTrustDialog({})
|
||||||
|
}, /certificate must be an object/)
|
||||||
|
|
||||||
|
assert.throws(() => {
|
||||||
|
dialog.showCertificateTrustDialog({certificate: {}, message: false})
|
||||||
|
}, /message must be a string/)
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue