@@ -13,7 +13,7 @@ describe("TestSubmissionClient", () => {
1313 config . heartbeatServerUrl = "http://heartbeat.localhost:5000" ;
1414
1515 test ( "should submit events" , async ( ) => {
16- const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
16+ const fetchMock = TestSubmissionClient . prototype . apiFetch = jest . fn ( )
1717 . mockReturnValueOnce ( new Response ( 202 , "" , undefined , undefined , undefined ) ) ;
1818
1919 const events = [ { type : "log" , message : "From js client" , reference_id : "123454321" } ] ;
@@ -28,7 +28,7 @@ describe("TestSubmissionClient", () => {
2828 } ) ;
2929
3030 test ( "should submit invalid object data" , async ( ) => {
31- const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
31+ const fetchMock = TestSubmissionClient . prototype . apiFetch = jest . fn ( )
3232 . mockReturnValueOnce ( new Response ( 202 , "" , undefined , undefined , undefined ) ) ;
3333
3434 const events : Event [ ] = [ {
@@ -49,7 +49,7 @@ describe("TestSubmissionClient", () => {
4949 } ) ;
5050
5151 test ( "should submit user description" , async ( ) => {
52- const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
52+ const fetchMock = TestSubmissionClient . prototype . apiFetch = jest . fn ( )
5353 . mockReturnValueOnce ( new Response ( 202 , "" , undefined , 1 , undefined ) )
5454 . mockReturnValueOnce ( new Response ( 202 , "" , undefined , undefined , JSON . stringify ( new ServerSettings ( { } , 1 ) ) ) ) ;
5555
@@ -71,7 +71,7 @@ describe("TestSubmissionClient", () => {
7171 } ) ;
7272
7373 test ( "should submit heartbeat" , async ( ) => {
74- const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
74+ const fetchMock = TestSubmissionClient . prototype . apiFetch = jest . fn ( )
7575 . mockReturnValueOnce ( new Response ( 200 , "" , undefined , undefined , undefined ) ) ;
7676
7777 const client = new TestSubmissionClient ( config ) ;
@@ -82,7 +82,7 @@ describe("TestSubmissionClient", () => {
8282 } ) ;
8383
8484 test ( "should get project settings" , async ( ) => {
85- const fetchMock = TestSubmissionClient . prototype . fetch = jest . fn ( )
85+ const fetchMock = TestSubmissionClient . prototype . apiFetch = jest . fn ( )
8686 . mockReturnValueOnce ( new Response ( 200 , "" , undefined , undefined , JSON . stringify ( new ServerSettings ( { } , 1 ) ) ) ) ;
8787
8888 const client = new TestSubmissionClient ( config ) ;
0 commit comments