File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -712,6 +712,14 @@ describe('app module', () => {
712712 } )
713713
714714 describe ( 'setPath(name, path)' , ( ) => {
715+ it ( 'throws when a relative path is passed' , ( ) => {
716+ const badPath = 'hey/hi/hello'
717+
718+ expect ( ( ) => {
719+ app . setPath ( 'music' , badPath )
720+ } ) . to . throw ( / P a t h m u s t b e a b s o l u t e / )
721+ } )
722+
715723 it ( 'does not create a new directory by default' , ( ) => {
716724 const badPath = path . join ( __dirname , 'music' )
717725
@@ -723,6 +731,16 @@ describe('app module', () => {
723731 } )
724732 } )
725733
734+ describe ( 'setAppLogsPath(path)' , ( ) => {
735+ it ( 'throws when a relative path is passed' , ( ) => {
736+ const badPath = 'hey/hi/hello'
737+
738+ expect ( ( ) => {
739+ app . setAppLogsPath ( badPath )
740+ } ) . to . throw ( / P a t h m u s t b e a b s o l u t e / )
741+ } )
742+ } )
743+
726744 describe ( 'select-client-certificate event' , ( ) => {
727745 let w : BrowserWindow
728746
You can’t perform that action at this time.
0 commit comments