File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 66 */
77import { Config , Interfaces } from '@oclif/core' ;
88import { expect } from 'chai' ;
9+ import { MockTestOrgData , TestContext } from '@salesforce/core/lib/testSetup' ;
910import { buildScratchOrgRequest } from '../../src/shared/scratchOrgRequest' ;
1011import EnvCreateScratch from '../../src/commands/org/create/scratch' ;
1112
@@ -21,6 +22,18 @@ const paramsToFlags = async (params: string[]): Promise<Interfaces.InferredFlags
2122 new Wrapper ( params , { } as Config ) . getFlags ( ) ;
2223
2324describe ( 'buildScratchOrgRequest function' , ( ) => {
25+ const $$ = new TestContext ( ) ;
26+ beforeEach ( async ( ) => {
27+ const hub = new MockTestOrgData ( ) ;
28+ hub . isDevHub = true ;
29+ await $$ . stubAuths ( hub ) ;
30+ await $$ . stubConfig ( { 'target-dev-hub' : hub . username } ) ;
31+ } ) ;
32+
33+ after ( ( ) => {
34+ $$ . SANDBOX . restore ( ) ;
35+ } ) ;
36+
2437 it ( 'edition as only flag' , async ( ) => {
2538 const flags = await paramsToFlags ( [ '--edition' , 'developer' ] ) ;
2639 const result = await buildScratchOrgRequest ( flags ) ;
You can’t perform that action at this time.
0 commit comments