if (options.buttonLabel == null) {
options.buttonLabel = ''
} else if (typeof options.buttonLabel !== 'string') {
- throw new TypeError('buttonLabel must be a string')
+ throw new TypeError('Button label must be a string')
}
if (options.defaultPath == null) {
options.defaultPath = ''
if (options.buttonLabel == null) {
options.buttonLabel = ''
} else if (typeof options.buttonLabel !== 'string') {
- throw new TypeError('buttonLabel must be a string')
+ throw new TypeError('Button label must be a string')
}
if (options.defaultPath == null) {
options.defaultPath = ''
assert.throws(() => {
dialog.showOpenDialog({buttonLabel: []})
- }, /buttonLabel must be a string/)
+ }, /Button label must be a string/)
assert.throws(() => {
dialog.showOpenDialog({defaultPath: {}})
assert.throws(() => {
dialog.showSaveDialog({buttonLabel: []})
- }, /buttonLabel must be a string/)
+ }, /Button label must be a string/)
assert.throws(() => {
dialog.showSaveDialog({defaultPath: {}})