@@ -22,7 +22,7 @@ describe('trackLoadingTime', () => {
2222 let clock : Clock
2323 let domMutationObservable : Observable < void >
2424 let windowOpenObservable : Observable < void >
25- let loadingTimeCallback : jasmine . Spy < ( loadingTime : Duration | undefined , wasHiddenDuringLoading : boolean ) => void >
25+ let loadingTimeCallback : jasmine . Spy < ( loadingTime ? : Duration ) => void >
2626 let setLoadEvent : ( loadEvent : Duration ) => void
2727 let stopLoadingTimeTracking : ( ) => void
2828
@@ -65,7 +65,7 @@ describe('trackLoadingTime', () => {
6565 domMutationObservable . notify ( )
6666 clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
6767
68- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) , false )
68+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) )
6969 } )
7070
7171 it ( 'should use loadEventEnd for initial view when having no activity' , ( ) => {
@@ -77,7 +77,7 @@ describe('trackLoadingTime', () => {
7777 setLoadEvent ( entry . loadEventEnd )
7878 clock . tick ( PAGE_ACTIVITY_END_DELAY )
7979
80- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( entry . loadEventEnd , false )
80+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( entry . loadEventEnd )
8181 } )
8282
8383 it ( 'should use loadEventEnd for initial view when load event is bigger than computed loading time' , ( ) => {
@@ -90,7 +90,7 @@ describe('trackLoadingTime', () => {
9090 domMutationObservable . notify ( )
9191 clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
9292
93- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( LOAD_EVENT_AFTER_ACTIVITY_TIMING ) , false )
93+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( LOAD_EVENT_AFTER_ACTIVITY_TIMING ) )
9494 } )
9595
9696 it ( 'should use computed loading time for initial view when load event is smaller than computed loading time' , ( ) => {
@@ -104,7 +104,7 @@ describe('trackLoadingTime', () => {
104104 domMutationObservable . notify ( )
105105 clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
106106
107- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) , false )
107+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) )
108108 } )
109109
110110 it ( 'should use computed loading time from time origin for initial view' , ( ) => {
@@ -127,8 +127,7 @@ describe('trackLoadingTime', () => {
127127 clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
128128
129129 expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith (
130- clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY + CLOCK_GAP ) ,
131- false
130+ clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY + CLOCK_GAP )
132131 )
133132 } )
134133
@@ -140,6 +139,6 @@ describe('trackLoadingTime', () => {
140139 domMutationObservable . notify ( )
141140 clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
142141
143- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( undefined , true )
142+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( undefined )
144143 } )
145144} )
0 commit comments