@@ -10,6 +10,7 @@ import { PythonExecutionFactory } from '../../client/common/process/pythonExecut
1010import { IPythonExecutionFactory } from '../../client/common/process/types' ;
1111import { Activation } from '../../client/datascience/activation' ;
1212import { PythonDaemonModule } from '../../client/datascience/constants' ;
13+ import { ActiveEditorContextService } from '../../client/datascience/context/activeEditorContext' ;
1314import { NativeEditor } from '../../client/datascience/interactive-ipynb/nativeEditor' ;
1415import { NativeEditorProvider } from '../../client/datascience/interactive-ipynb/nativeEditorProvider' ;
1516import { INotebookEditor , INotebookEditorProvider } from '../../client/datascience/types' ;
@@ -26,24 +27,25 @@ suite('Data Science - Activation', () => {
2627 let executionFactory : IPythonExecutionFactory ;
2728 let openedEventEmitter : EventEmitter < INotebookEditor > ;
2829 let interpreterEventEmitter : EventEmitter < void > ;
29-
30+ let contextService : ActiveEditorContextService ;
3031 setup ( async ( ) => {
3132 openedEventEmitter = new EventEmitter < INotebookEditor > ( ) ;
3233 interpreterEventEmitter = new EventEmitter < void > ( ) ;
3334
3435 notebookProvider = mock ( NativeEditorProvider ) ;
3536 interpreterService = mock ( InterpreterService ) ;
3637 executionFactory = mock ( PythonExecutionFactory ) ;
38+ contextService = mock ( ActiveEditorContextService ) ;
3739 when ( notebookProvider . onDidOpenNotebookEditor ) . thenReturn ( openedEventEmitter . event ) ;
3840 when ( interpreterService . onDidChangeInterpreter ) . thenReturn ( interpreterEventEmitter . event ) ;
3941 when ( executionFactory . createDaemon ( anything ( ) ) ) . thenResolve ( ) ;
40-
41- activator = new Activation ( instance ( notebookProvider ) , instance ( interpreterService ) , instance ( executionFactory ) , [ ] ) ;
42+ when ( contextService . activate ( ) ) . thenResolve ( ) ;
43+ activator = new Activation ( instance ( notebookProvider ) , instance ( interpreterService ) , instance ( executionFactory ) , [ ] , instance ( contextService ) ) ;
4244 await activator . activate ( ) ;
4345 } ) ;
4446
4547 async function testCreatingDaemonWhenOpeningANotebook ( ) {
46- const notebook = mock ( NativeEditor ) ;
48+ const notebook : INotebookEditor = mock ( NativeEditor ) ;
4749 const interpreter = ( { path : 'MY_PY' } as any ) as PythonInterpreter ;
4850
4951 when ( interpreterService . getActiveInterpreter ( undefined ) ) . thenResolve ( interpreter ) ;
0 commit comments