@@ -48,7 +48,11 @@ describe('org:display', () => {
4848
4949 beforeEach ( async function ( ) {
5050 $$ . SANDBOX . restore ( ) ;
51- stubMethod ( $$ . SANDBOX , Aliases , 'fetch' ) . withArgs ( 'nonscratchalias' ) . resolves ( '[email protected] ' ) ; 51+ stubMethod ( $$ . SANDBOX , Aliases , 'fetch' )
52+ . withArgs ( 'nonscratchalias' )
53+ 54+ . withArgs ( 'scratchAlias' )
55+ 5256 stubMethod ( $$ . SANDBOX , utils , 'getAliasByUsername' )
53575458 . resolves ( 'nonscratchalias' )
@@ -203,6 +207,8 @@ describe('org:display', () => {
203207 devHubUsername : devHub . username ,
204208 } ) ;
205209 stubMethod ( $$ . SANDBOX , Org , 'create' ) . resolves ( Org . prototype ) ;
210+ stubMethod ( $$ . SANDBOX , Org . prototype , 'getUsername' ) . returns ( '[email protected] ' ) ; 211+
206212 stubMethod ( $$ . SANDBOX , Org . prototype , 'getOrgId' ) . resolves ( devHub . id ) ;
207213 stubMethod ( $$ . SANDBOX , Org . prototype , 'getDevHubOrg' ) . resolves ( {
208214 getUsername : ( ) => devHub . username ,
@@ -227,7 +233,6 @@ describe('org:display', () => {
227233 . stdout ( )
228234 . command ( [ 'force:org:display' , '--targetusername' , '[email protected] ' , '--json' ] ) 229235 . it ( 'queries server for scratch org info' , ( ctx ) => {
230- // console.log(ctx.stdout);
231236 const result = JSON . parse ( ctx . stdout ) . result ;
232237 expect ( result ) . to . not . be . undefined ;
233238 expect ( result . status ) . to . equal ( 'Active' ) ;
0 commit comments