File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,20 @@ describe('Shell', () => {
1616 it ( 'should spawn a new child process' , async ( ) => {
1717 await shell . initialize ( 'test' , [ 'arg1' , 'arg2' ] , { env1 : 'test' } ) ;
1818
19+ const env = {
20+ ...process . env ,
21+ env1 : 'test' ,
22+ } ;
23+
24+ //@ts -ignore
25+ delete env . ECLIPSE_API_URL ;
26+ //@ts -ignore
27+ delete env . ECLIPSE_CLI_KEY ;
28+
1929 expect ( spawn ) . toHaveBeenCalledTimes ( 1 ) ;
2030 expect ( spawn ) . toHaveBeenCalledWith ( 'test' , [ 'arg1' , 'arg2' ] , {
2131 stdio : 'inherit' ,
22- env : { ... process . env , env1 : 'test' } ,
32+ env,
2333 } ) ;
2434 } ) ;
2535 } ) ;
@@ -31,10 +41,17 @@ describe('Shell', () => {
3141 env1 : 'test' ,
3242 } ) ;
3343
34- expect ( result ) . toEqual ( {
44+ const env = {
3545 ...process . env ,
3646 env1 : 'test' ,
37- } ) ;
47+ } ;
48+
49+ //@ts -ignore
50+ delete env . ECLIPSE_API_URL ;
51+ //@ts -ignore
52+ delete env . ECLIPSE_CLI_KEY ;
53+
54+ expect ( result ) . toEqual ( env ) ;
3855 } ) ;
3956 } ) ;
4057} ) ;
You can’t perform that action at this time.
0 commit comments