@@ -45,16 +45,18 @@ suite('Extension build installer - Stable build installer', async () => {
4545 test ( 'Installing stable build logs progress and installs stable' , async ( ) => {
4646 when ( output . append ( ExtensionChannels . installingStableMessage ( ) ) ) . thenReturn ( ) ;
4747 when ( output . appendLine ( ExtensionChannels . installationCompleteMessage ( ) ) ) . thenReturn ( ) ;
48- when ( cmdManager . executeCommand ( 'workbench.extensions.installExtension' , PVSC_EXTENSION_ID ) ) . thenResolve (
49- undefined ,
50- ) ;
48+ when (
49+ cmdManager . executeCommand ( 'workbench.extensions.installExtension' , PVSC_EXTENSION_ID , anything ( ) ) ,
50+ ) . thenResolve ( undefined ) ;
5151 when ( appShell . withProgressCustomIcon ( anything ( ) , anything ( ) ) ) . thenCall ( ( _ , cb ) => cb ( progressReporter ) ) ;
5252 await stableBuildInstaller . install ( ) ;
5353 verify ( output . append ( ExtensionChannels . installingStableMessage ( ) ) ) . once ( ) ;
5454 verify ( output . appendLine ( ExtensionChannels . installationCompleteMessage ( ) ) ) . once ( ) ;
5555 verify ( appShell . withProgressCustomIcon ( anything ( ) , anything ( ) ) ) ;
5656 expect ( progressReportStub . callCount ) . to . equal ( 1 ) ;
57- verify ( cmdManager . executeCommand ( 'workbench.extensions.installExtension' , PVSC_EXTENSION_ID ) ) . once ( ) ;
57+ verify (
58+ cmdManager . executeCommand ( 'workbench.extensions.installExtension' , PVSC_EXTENSION_ID , anything ( ) ) ,
59+ ) . once ( ) ;
5860 } ) ;
5961} ) ;
6062
@@ -102,9 +104,12 @@ suite('Extension build installer - Insiders build installer', async () => {
102104 } ,
103105 ) ;
104106 when ( appShell . withProgressCustomIcon ( anything ( ) , anything ( ) ) ) . thenCall ( ( _ , cb ) => cb ( progressReporter ) ) ;
105- when ( cmdManager . executeCommand ( 'workbench.extensions.installExtension' , anything ( ) ) ) . thenCall ( ( _ , cb ) => {
106- assert . deepEqual ( cb , Uri . file ( vsixFilePath ) , 'Wrong VSIX installed' ) ;
107- } ) ;
107+ when ( cmdManager . executeCommand ( 'workbench.extensions.installExtension' , anything ( ) , anything ( ) ) ) . thenCall (
108+ ( _ , uri , options ) => {
109+ assert . deepStrictEqual ( uri , Uri . file ( vsixFilePath ) , 'Wrong VSIX installed' ) ;
110+ assert . deepStrictEqual ( options , { installOnlyNewlyAddedFromExtensionPackVSIX : true } ) ;
111+ } ,
112+ ) ;
108113 when ( fs . deleteFile ( vsixFilePath ) ) . thenResolve ( ) ;
109114
110115 await insidersBuildInstaller . install ( ) ;
@@ -115,7 +120,7 @@ suite('Extension build installer - Insiders build installer', async () => {
115120 verify ( output . appendLine ( ExtensionChannels . installationCompleteMessage ( ) ) ) . once ( ) ;
116121 verify ( appShell . withProgressCustomIcon ( anything ( ) , anything ( ) ) ) ;
117122 expect ( progressReportStub . callCount ) . to . equal ( 1 ) ;
118- verify ( cmdManager . executeCommand ( 'workbench.extensions.installExtension' , anything ( ) ) ) . once ( ) ;
123+ verify ( cmdManager . executeCommand ( 'workbench.extensions.installExtension' , anything ( ) , anything ( ) ) ) . once ( ) ;
119124 verify ( fs . deleteFile ( vsixFilePath ) ) . once ( ) ;
120125 } ) ;
121126} ) ;
0 commit comments