@@ -159,9 +159,13 @@ describe('install/uninstall integration tests', () => {
159159 const { result, stdout} = await runCommand < Array < { name : string } > > ( 'plugins' )
160160 expect ( stdout ) . to . contain ( pluginShortName )
161161 expect ( result ?. some ( ( r ) => r . name === plugin ) ) . to . be . true
162+ await runCommand ( `plugins install ${ otherPlugin } ` )
163+ const { stdout : otherStdout } = await runCommand < Array < { name : string } > > ( 'plugins' )
164+ expect ( otherStdout ) . to . contain ( otherPlugin )
162165 } )
163166
164167 it ( 'should uninstall plugin from github' , async ( ) => {
168+ await runCommand ( `plugins uninstall ${ otherPlugin } ` )
165169 await runCommand ( `plugins uninstall ${ plugin } ` )
166170 const { result, stdout} = await runCommand < Array < { name : string } > > ( 'plugins' )
167171 expect ( stdout ) . to . contain ( 'No plugins installed.' )
@@ -185,7 +189,7 @@ describe('install/uninstall integration tests', () => {
185189 } )
186190 } )
187191
188- describe ( 'multiple plugins sequentially' , async ( ) => {
192+ describe ( 'multiple plugins sequentially' , ( ) => {
189193 /**
190194 * This is a test for @W-21915680@, a bizarre bug wherein if you installed a plugin from the registry by its true name,
191195 * and then installed a local tarball whose package name is alphabetically after the previous one, the local tarball
@@ -212,6 +216,7 @@ describe('install/uninstall integration tests', () => {
212216 console . log ( `third add stdout: ${ thirdAdd } ` )
213217 const { result : thirdResult , stdout : thirdStdout } = await runCommand < Array < { name : string } > > ( 'plugins' )
214218 expect ( thirdStdout ) . to . contain ( pluginShortName )
219+ console . log ( `plugins stdout is ${ thirdStdout } ` )
215220 expect ( thirdResult ?. some ( ( r ) => r . name === otherPlugin ) ) . to . be . true
216221 expect ( thirdResult ?. some ( ( r ) => r . name === yetAnotherPlugin ) ) . to . be . true
217222 expect ( thirdResult ?. some ( ( r ) => r . name === plugin ) ) . to . be . true
@@ -261,6 +266,7 @@ describe('install/uninstall integration tests', () => {
261266
262267 describe ( 'legacy plugin' , ( ) => {
263268 it ( 'should install legacy plugin' , async ( ) => {
269+ /*
264270 const {stdout: firstAdd} = await runCommand('plugins install @oclif/plugin-legacy')
265271 const {stdout: secondAdd} = await runCommand('plugins install @heroku-cli/plugin-ps-exec --silent')
266272 console.log(`firstStdout: ${firstAdd}`)
@@ -269,6 +275,30 @@ describe('install/uninstall integration tests', () => {
269275 console.log(`stdout is ${stdout}`)
270276 expect(stdout).to.contain('@heroku-cli/plugin-ps-exec')
271277 expect(result?.some((r) => r.name === '@heroku-cli/plugin-ps-exec')).to.be.true
278+
279+ */
280+ const { stdout : otherAdd } = await runCommand ( 'plugins install @oclif/plugin-version' )
281+ console . log ( `===== stdout from adding @oclif/plugin-version===\n${ otherAdd } \n====` )
282+
283+
284+ const { stdout : otherPlugins } = await runCommand < Array < { name : string } > > ( 'plugins' )
285+ console . log ( `====== stdout from plugins call after that======\n${ otherPlugins } \n======` )
286+
287+
288+
289+ const { stdout : firstAdd } = await runCommand ( 'plugins install @oclif/plugin-legacy' )
290+ const { result : firstResult , stdout : firstPlugins } = await runCommand < Array < { name : string } > > ( 'plugins' )
291+ console . log ( `===== stdout from adding @oclif/plugin-legacy =====\n${ firstAdd } \n=======` )
292+ console . log ( `=== stdout from running plugins command the first time ===\n${ firstPlugins } \n====` )
293+ expect ( firstPlugins ) . to . contain ( '@oclif/plugin-legacy' )
294+ expect ( firstResult ?. some ( ( r ) => r . name === '@oclif/plugin-legacy' ) ) . to . be . true
295+
296+ const { stdout : secondAdd } = await runCommand ( 'plugins install @heroku-cli/plugin-ps-exec --silent' )
297+ console . log ( `====== stdout from adding @heroku-cli/plugins-ps-exec --silent =====\n${ secondAdd } \n==========` )
298+ const { result, stdout} = await runCommand < Array < { name : string } > > ( 'plugins' )
299+ console . log ( `====== stdout from running plugins command the second time ====\n${ stdout } \n=====` )
300+ expect ( stdout ) . to . contain ( '@heroku-cli/plugin-ps-exec' )
301+ expect ( result ?. some ( ( r ) => r . name === '@heroku-cli/plugin-ps-exec' ) ) . to . be . true
272302 } )
273303 } )
274304} )
0 commit comments