File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/test/common/terminals Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,19 @@ suite('Terminal Service helpers', () => {
108108 expect ( safeTerminalOptions ) . to . not . have . property ( 'PYTHONSTARTUP' ) ;
109109 } ) ;
110110
111+ test ( 'Env should be undefined if not explicitly passed in ' , ( ) => {
112+ const theTitle = 'Hello' ;
113+ const terminal = 'Terminal Created' ;
114+ when ( terminalManager . createTerminal ( anything ( ) ) ) . thenReturn ( terminal as any ) ;
115+
116+ const term = helper . createTerminal ( theTitle ) ;
117+
118+ verify ( terminalManager . createTerminal ( anything ( ) ) ) . once ( ) ;
119+ const args = capture ( terminalManager . createTerminal ) . first ( ) [ 0 ] ;
120+ expect ( term ) . to . be . deep . equal ( terminal ) ;
121+ expect ( args . env ) . to . be . deep . equal ( undefined ) ;
122+ } ) ;
123+
111124 test ( 'Create terminal without a title' , ( ) => {
112125 const terminal = 'Terminal Created' ;
113126 when ( terminalManager . createTerminal ( anything ( ) ) ) . thenReturn ( terminal as any ) ;
You can’t perform that action at this time.
0 commit comments