@@ -14,7 +14,7 @@ describe("TestSubmissionClient", () => {
1414
1515 test ( "should submit events" , async ( ) => {
1616 const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
17- . mockReturnValueOnce ( new Response < void > ( 202 , "" , - 1 , undefined ) ) ;
17+ . mockReturnValueOnce ( new Response ( 202 , "" , undefined , undefined , undefined ) ) ;
1818
1919 const events = [ { type : "log" , message : "From js client" , reference_id : "123454321" } ] ;
2020 const client = new TestSubmissionClient ( config ) ;
@@ -29,7 +29,7 @@ describe("TestSubmissionClient", () => {
2929
3030 test ( "should submit invalid object data" , async ( ) => {
3131 const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
32- . mockReturnValueOnce ( new Response < void > ( 202 , "" , - 1 , undefined ) ) ;
32+ . mockReturnValueOnce ( new Response ( 202 , "" , undefined , undefined , undefined ) ) ;
3333
3434 const events : Event [ ] = [ {
3535 type : "log" , message : "From js client" , reference_id : "123454321" , data : {
@@ -50,7 +50,7 @@ describe("TestSubmissionClient", () => {
5050
5151 test ( "should submit user description" , async ( ) => {
5252 const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
53- . mockReturnValueOnce ( new Response < void > ( 202 , "" , - 1 , undefined ) ) ;
53+ . mockReturnValueOnce ( new Response ( 202 , "" , undefined , undefined , undefined ) ) ;
5454
5555 const description : UserDescription = {
5656 email_address :
"[email protected] " , @@ -69,8 +69,8 @@ describe("TestSubmissionClient", () => {
6969
7070 test ( "should submit heartbeat" , async ( ) => {
7171 const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
72- . mockReturnValueOnce ( new Response < void > ( 200 , "" , 1 , undefined ) )
73- . mockReturnValueOnce ( new Response < ClientSettings > ( 200 , "" , 1 , new ClientSettings ( { } , 1 ) ) ) ;
72+ . mockReturnValueOnce ( new Response ( 200 , "" , undefined , 1 , undefined ) )
73+ . mockReturnValueOnce ( new Response ( 200 , "" , undefined , 1 , JSON . stringify ( new ClientSettings ( { } , 1 ) ) ) ) ;
7474
7575 const client = config . services . submissionClient = new TestSubmissionClient ( config ) ;
7676 await client . submitHeartbeat ( "sessionId" , true ) ;
@@ -83,7 +83,7 @@ describe("TestSubmissionClient", () => {
8383
8484 test ( "should get project settings" , async ( ) => {
8585 const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
86- . mockReturnValueOnce ( new Response < ClientSettings > ( 200 , "" , undefined , new ClientSettings ( { } , 1 ) ) ) ;
86+ . mockReturnValueOnce ( new Response ( 200 , "" , undefined , undefined , JSON . stringify ( new ClientSettings ( { } , 1 ) ) ) ) ;
8787
8888 const client = new TestSubmissionClient ( config ) ;
8989 await client . getSettings ( 0 ) ;
0 commit comments