@@ -77,7 +77,7 @@ describe("extensibilityService", () => {
77
77
argsPassedToNpmInstall . packageName = packageName ;
78
78
argsPassedToNpmInstall . pathToSave = pathToSave ;
79
79
argsPassedToNpmInstall . config = config ;
80
- return [ userSpecifiedValue ] ;
80
+ return { name : userSpecifiedValue } ;
81
81
} ;
82
82
83
83
const extensibilityService : IExtensibilityService = testInjector . resolve ( ExtensibilityService ) ;
@@ -130,7 +130,7 @@ describe("extensibilityService", () => {
130
130
fs . readDirectory = ( dir : string ) : string [ ] => [ extensionName ] ;
131
131
132
132
const npm : INodePackageManager = testInjector . resolve ( "npm" ) ;
133
- npm . install = async ( packageName : string , pathToSave : string , config ?: any ) : Promise < any > => [ extensionName ] ;
133
+ npm . install = async ( packageName : string , pathToSave : string , config ?: any ) : Promise < any > => ( { name : extensionName } ) ;
134
134
135
135
const extensibilityService : IExtensibilityService = testInjector . resolve ( ExtensibilityService ) ;
136
136
const actualResult = await extensibilityService . installExtension ( extensionName ) ;
@@ -148,7 +148,7 @@ describe("extensibilityService", () => {
148
148
fs . readDirectory = ( dir : string ) : string [ ] => [ extensionName ] ;
149
149
150
150
const npm : INodePackageManager = testInjector . resolve ( "npm" ) ;
151
- npm . install = async ( packageName : string , pathToSave : string , config ?: any ) : Promise < any > => [ extensionName ] ;
151
+ npm . install = async ( packageName : string , pathToSave : string , config ?: any ) : Promise < any > => ( { name : extensionName } ) ;
152
152
153
153
const requireService : IRequireService = testInjector . resolve ( "requireService" ) ;
154
154
requireService . require = ( pathToRequire : string ) => {
@@ -230,7 +230,7 @@ describe("extensibilityService", () => {
230
230
npm . install = async ( packageName : string , pathToSave : string , config ?: any ) : Promise < any > => {
231
231
assert . deepEqual ( packageName , extensionNames [ 0 ] ) ;
232
232
isNpmInstallCalled = true ;
233
- return [ packageName ] ;
233
+ return { name : packageName } ;
234
234
} ;
235
235
236
236
const expectedResults : IExtensionData [ ] = _ . map ( extensionNames , extensionName => ( { extensionName } ) ) ;
0 commit comments