@@ -128,8 +128,7 @@ describe('orgListUtil tests', () => {
128128 } ) ;
129129
130130 it ( 'readLocallyValidatedMetaConfigsGroupedByOrgType' , async ( ) => {
131- const flags = { } ;
132- const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , flags ) ;
131+ const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , false ) ;
133132 expect ( orgs . nonScratchOrgs . every ( ( nonScratchOrg ) => nonScratchOrg . connectedStatus !== undefined ) ) . to . be . true ;
134133 expect ( orgs . scratchOrgs . length ) . to . equal ( 2 ) ;
135134 expect ( orgs . scratchOrgs [ 0 ] ) . to . haveOwnProperty ( 'username' ) . to . equal ( '[email protected] ' ) ; @@ -143,8 +142,7 @@ describe('orgListUtil tests', () => {
143142 } ) ;
144143
145144 it ( 'skipconnectionstatus' , async ( ) => {
146- const flags = { skipconnectionstatus : true } ;
147- const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , flags ) ;
145+ const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , true ) ;
148146
149147 // we didn't check the status, so the hub is still not known to be a devhub
150148 expect ( orgs . nonScratchOrgs [ 0 ] . isDevHub ) . to . be . false ;
@@ -155,9 +153,17 @@ describe('orgListUtil tests', () => {
155153 expect ( determineConnectedStatusForNonScratchOrg . called ) . to . be . false ;
156154 } ) ;
157155
156+ it ( 'skipconnectionstatus with default' , async ( ) => {
157+ const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames ) ;
158+ expect ( orgs . nonScratchOrgs . every ( ( org ) => org . connectedStatus !== undefined ) ) . to . be . true ;
159+ expect ( orgs . other . every ( ( org ) => org . connectedStatus !== undefined ) ) . to . be . true ;
160+ expect ( orgs . sandboxes . every ( ( org ) => org . connectedStatus !== undefined ) ) . to . be . true ;
161+
162+ expect ( determineConnectedStatusForNonScratchOrg . called ) . to . be . true ;
163+ } ) ;
164+
158165 it ( 'should omit sensitive information and catergorise active and non-active scracth orgs' , async ( ) => {
159- const flags = { } ;
160- const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , flags ) ;
166+ const orgs = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , false ) ;
161167
162168 expect ( orgs . scratchOrgs [ 0 ] ) . to . not . haveOwnProperty ( 'clientSecret' ) ;
163169 expect ( orgs . scratchOrgs [ 1 ] ) . to . not . haveOwnProperty ( 'clientSecret' ) ;
@@ -166,15 +172,13 @@ describe('orgListUtil tests', () => {
166172 } ) ;
167173
168174 it ( 'should execute queries to check for org information if --verbose is used' , async ( ) => {
169- const flags = { verbose : true } ;
170- await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , flags ) ;
175+ await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , true ) ;
171176 expect ( retrieveScratchOrgInfoFromDevHubStub . calledOnce ) . to . be . true ;
172177 expect ( spies . get ( 'reduceScratchOrgInfo' ) . calledOnce ) . to . be . true ;
173178 } ) ;
174179
175180 it ( 'execute queries should add information to grouped orgs' , async ( ) => {
176- const flags = { verbose : true } ;
177- const orgGroups = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , flags ) ;
181+ const orgGroups = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , true ) ;
178182 expect ( retrieveScratchOrgInfoFromDevHubStub . calledOnce ) . to . be . true ;
179183 expect ( spies . get ( 'reduceScratchOrgInfo' ) . calledOnce ) . to . be . true ;
180184 expect ( orgGroups . scratchOrgs [ 0 ] . signupUsername ) . to . equal ( orgAuthConfigFields . username ) ;
@@ -198,7 +202,7 @@ describe('orgListUtil tests', () => {
198202 stubMethod ( sandbox , Org . prototype , 'getUsername' ) . returns ( devHubConfigFields . username ) ;
199203 stubMethod ( sandbox , Org . prototype , 'refreshAuth' ) . rejects ( { message : 'bad auth' } ) ;
200204
201- const orgGroups = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , { } ) ;
205+ const orgGroups = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , false ) ;
202206 expect ( orgGroups . nonScratchOrgs ) . to . have . length ( 1 ) ;
203207 expect ( orgGroups . nonScratchOrgs [ 0 ] . connectedStatus ) . to . equal ( 'bad auth' ) ;
204208 expect ( checkNonScratchOrgIsDevHub . called ) . to . be . false ;
@@ -208,7 +212,7 @@ describe('orgListUtil tests', () => {
208212 determineConnectedStatusForNonScratchOrg . restore ( ) ;
209213 stubMethod ( sandbox , Org , 'create' ) . rejects ( { message : 'bad file' } ) ;
210214
211- const orgGroups = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , { } ) ;
215+ const orgGroups = await OrgListUtil . readLocallyValidatedMetaConfigsGroupedByOrgType ( fileNames , false ) ;
212216 expect ( orgGroups . nonScratchOrgs ) . to . have . length ( 1 ) ;
213217 expect ( orgGroups . nonScratchOrgs [ 0 ] . connectedStatus ) . to . equal ( 'bad file' ) ;
214218 expect ( checkNonScratchOrgIsDevHub . called ) . to . be . false ;
0 commit comments