Add tests to check errors in parameters
This commit is contained in:
		
					parent
					
						
							
								9423143211
							
						
					
				
			
			
				commit
				
					
						72723646dd
					
				
			
		
					 1 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -19,6 +19,10 @@ describe('dialog module', () => {
 | 
			
		|||
      assert.throws(() => {
 | 
			
		||||
        dialog.showOpenDialog({defaultPath: {}})
 | 
			
		||||
      }, /Default path must be a string/)
 | 
			
		||||
 | 
			
		||||
      assert.throws(() => {
 | 
			
		||||
        dialog.showOpenDialog({message: {}})
 | 
			
		||||
      }, /Message must be a string/)
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +39,14 @@ describe('dialog module', () => {
 | 
			
		|||
      assert.throws(() => {
 | 
			
		||||
        dialog.showSaveDialog({defaultPath: {}})
 | 
			
		||||
      }, /Default path must be a string/)
 | 
			
		||||
 | 
			
		||||
      assert.throws(() => {
 | 
			
		||||
        dialog.showSaveDialog({message: {}})
 | 
			
		||||
      }, /Message must be a string/)
 | 
			
		||||
 | 
			
		||||
      assert.throws(() => {
 | 
			
		||||
        dialog.showSaveDialog({nameFieldLabel: {}})
 | 
			
		||||
      }, /Name field label must be a string/)
 | 
			
		||||
    })
 | 
			
		||||
  })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue