File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/test/common/terminals Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,21 @@ suite('Terminal Service helpers', () => {
107107 const safeTerminalOptions = terminalOptions || { } ;
108108 expect ( safeTerminalOptions ) . to . not . have . property ( 'PYTHONSTARTUP' ) ;
109109 } ) ;
110+ test ( 'Create terminal should respect env passed in' , ( ) => {
111+ const terminal = 'Terminal Created' ;
112+ when ( terminalManager . createTerminal ( anything ( ) ) ) . thenReturn ( terminal as any ) ;
113+ terminalManager . createTerminal ( {
114+ name : 'Python' ,
115+ env : { } ,
116+ hideFromUser : undefined ,
117+ } ) ;
118+ const args = capture ( terminalManager . createTerminal ) . first ( ) [ 0 ] ;
119+ const terminalOptions = args . env ;
120+ const safeTerminalOptions = terminalOptions || { } ;
121+ expect ( safeTerminalOptions ) . to . have . property ( 'myCustomEnv' , '123' ) ;
122+ } ) ;
123+ } )
124+
110125 test ( 'Create terminal without a title' , ( ) => {
111126 const terminal = 'Terminal Created' ;
112127 when ( terminalManager . createTerminal ( anything ( ) ) ) . thenReturn ( terminal as any ) ;
You can’t perform that action at this time.
0 commit comments