@@ -56,10 +56,11 @@ describe('install/uninstall integration tests', () => {
5656 } catch { }
5757 } )
5858
59- beforeEach ( ( ) => {
59+ beforeEach ( async ( ) => {
6060 process . env . MYCLI_CACHE_DIR = cacheDir
6161 process . env . MYCLI_CONFIG_DIR = configDir
6262 process . env . MYCLI_DATA_DIR = dataDir
63+ await runCommand ( 'plugins reset' )
6364 } )
6465
6566 afterEach ( ( ) => {
@@ -258,18 +259,12 @@ describe('install/uninstall integration tests', () => {
258259
259260 describe ( 'legacy plugin' , ( ) => {
260261 it ( 'should install legacy plugin' , async ( ) => {
261- try {
262- await runCommand ( 'plugins install @oclif/plugin-legacy' )
263- await runCommand ( 'plugins install @heroku-cli/plugin-ps-exec --silent' )
264- const { result, stdout} = await runCommand < Array < { name : string } > > ( 'plugins' )
265- console . log ( `stdout is ${ stdout } ` )
266- expect ( stdout ) . to . contain ( '@heroku-cli/plugin-ps-exec' )
267- expect ( result ?. some ( ( r ) => r . name === '@heroku-cli/plugin-ps-exec' ) ) . to . be . true
268- } catch ( error ) {
269- const err : Error = error as Error ;
270- console . log ( `ERR: ${ err . name } ; ${ err . message } , ${ err . stack } ` )
271- expect ( true ) . to . equal ( false , 'ERROR SHOULD NOT HAVE HAPPENED' )
272- }
262+ await runCommand ( 'plugins install @oclif/plugin-legacy' )
263+ await runCommand ( 'plugins install @heroku-cli/plugin-ps-exec --silent' )
264+ const { result, stdout} = await runCommand < Array < { name : string } > > ( 'plugins' )
265+ console . log ( `stdout is ${ stdout } ` )
266+ expect ( stdout ) . to . contain ( '@heroku-cli/plugin-ps-exec' )
267+ expect ( result ?. some ( ( r ) => r . name === '@heroku-cli/plugin-ps-exec' ) ) . to . be . true
273268 } )
274269 } )
275270} )
0 commit comments