@@ -7,7 +7,6 @@ import { AnonymousApexRunner } from '../../../../src/utils/apex/executor/Anonymo
77
88describe ( 'AnonymusApexRunner' , ( ) => {
99 let org : Org ;
10- // let executeAnonymousStub: sinon.SinonStub;
1110 let sandboxStub : sinon . SinonSandbox ;
1211
1312 beforeEach ( async ( ) => {
@@ -22,7 +21,6 @@ describe('AnonymusApexRunner', () => {
2221 } ) ;
2322
2423 afterEach ( ( ) => {
25- // executeAnonymousStub.restore();
2624 sandboxStub . restore ( ) ;
2725 } ) ;
2826
@@ -34,8 +32,6 @@ describe('AnonymusApexRunner', () => {
3432 . stub ( )
3533 . returns ( Promise . resolve ( { success : true } as unknown as ExecuteAnonymousResult ) ) ;
3634 sandboxStub . stub ( Org . prototype . getConnection ( ) . tooling , 'executeAnonymous' ) . callsFake ( executeAnonymousResultStub ) ;
37- // .stub(org.getConnection().tooling.executeAnonymous(), 'executeAnonymous')
38- // .returns(Promise.resolve({ success: true } as unknown as ExecuteAnonymousResult));
3935
4036 const result = await AnonymousApexRunner . run ( org , anonymousApex ) ;
4137
@@ -48,7 +44,6 @@ describe('AnonymusApexRunner', () => {
4844 const anonymousApex = "System.debug 'Hello, World');" ;
4945 const executeAnonymousError = new Error ( 'Error executing anonymous Apex' ) ;
5046 const executeAnonymousResultStub = sandboxStub . stub ( ) . rejects ( executeAnonymousError ) ;
51- // executeAnonymousStub.rejects(executeAnonymousError);
5247 sandboxStub . stub ( Org . prototype . getConnection ( ) . tooling , 'executeAnonymous' ) . callsFake ( executeAnonymousResultStub ) ;
5348
5449 try {
0 commit comments