File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ export interface IExtensionApi {
7070 */
7171 execCommand : string [ ] | undefined ;
7272 } ;
73+ getEnvFile ( workspaceFolder ?:Uri ) : string ;
7374 } ;
7475
7576 datascience : {
Original file line number Diff line number Diff line change @@ -72,6 +72,19 @@ suite('Extension API', () => {
7272 assert . deepEqual ( execDetails , { execCommand : undefined } ) ;
7373 } ) ;
7474
75+ test ( 'getEnvFile API returns expected object if interpreter is set' , async ( ) => {
76+ const resource = Uri . parse ( 'a' ) ;
77+ when ( configurationService . getSettings ( resource ) ) . thenReturn ( { envFile : 'envFile' } as any ) ;
78+
79+ const envFile = buildApi (
80+ Promise . resolve ( ) ,
81+ instance ( serviceManager ) ,
82+ instance ( serviceContainer ) ,
83+ ) . settings . getEnvFile ( resource ) ;
84+
85+ assert . equal ( envFile , 'envFile' ) ;
86+ } ) ;
87+
7588 test ( 'Provide a callback which is called when interpreter setting changes' , async ( ) => {
7689 const expectedEvent = Typemoq . Mock . ofType < Event < Uri | undefined > > ( ) . object ;
7790 when ( interpreterService . onDidChangeInterpreterConfiguration ) . thenReturn ( expectedEvent ) ;
You can’t perform that action at this time.
0 commit comments