@@ -18,6 +18,7 @@ describe('Sign an arbitrary payload with trading account key', function () {
1818 } ,
1919 } ,
2020 } ;
21+ const stringifiedPayload = JSON . stringify ( payload ) ;
2122 const signature = 'signedPayload123' ;
2223 const walletId = 'myWalletId' ;
2324
@@ -41,11 +42,7 @@ describe('Sign an arbitrary payload with trading account key', function () {
4142 process . env [ 'WALLET_myWalletId_PASSPHRASE' ] = 'mypass' ;
4243 } ) ;
4344
44- it ( 'should return a signed payload' , async function ( ) {
45- // TODO(GO-1015): unskip test
46- return ;
47-
48- // eslint-disable-next-line no-unreachable
45+ it ( 'should return a signed payload with type as object' , async function ( ) {
4946 const expectedResponse = {
5047 payload : JSON . stringify ( payload ) ,
5148 signature,
@@ -60,6 +57,21 @@ describe('Sign an arbitrary payload with trading account key', function () {
6057 } as unknown as Request ;
6158 await handleV2OFCSignPayload ( req ) . should . be . resolvedWith ( expectedResponse ) ;
6259 } ) ;
60+ it ( 'should return a signed payload with type as json string' , async function ( ) {
61+ const expectedResponse = {
62+ payload : stringifiedPayload ,
63+ signature,
64+ } ;
65+ const req = {
66+ bitgo : bitGoStub ,
67+ body : {
68+ payload : stringifiedPayload ,
69+ walletId,
70+ } ,
71+ query : { } ,
72+ } as unknown as Request ;
73+ await handleV2OFCSignPayload ( req ) . should . be . resolvedWith ( expectedResponse ) ;
74+ } ) ;
6375} ) ;
6476
6577describe ( 'With the handler to sign an arbitrary payload in external signing mode' , ( ) => {
0 commit comments