File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1037,9 +1037,7 @@ class BitbucketScm extends Scm {
10371037 }
10381038
10391039 const response = await this . breaker . runCommand ( params ) ;
1040-
1041- // we will have to parse the body since we are sending a normal FORM POST request
1042- const body = JSON . parse ( response . body ) ;
1040+ const { body } = response ;
10431041
10441042 if ( response . statusCode !== 200 ) {
10451043 throw new Error ( `STATUS CODE ${ response . statusCode } : ${ JSON . stringify ( body ) } ` ) ;
Original file line number Diff line number Diff line change @@ -2213,7 +2213,7 @@ describe('index', function() {
22132213 beforeEach ( ( ) => {
22142214 const response = {
22152215 statusCode : 200 ,
2216- body : JSON . stringify ( testPayloadAccessToken )
2216+ body : testPayloadAccessToken
22172217 } ;
22182218
22192219 requestMock . resolves ( response ) ;
You can’t perform that action at this time.
0 commit comments