@@ -22,7 +22,7 @@ vi.mock('@sentry/core', async () => {
2222 return {
2323 ...actual ,
2424 browserPerformanceTimeOrigin : vi . fn ( ) ,
25- performanceTimeToSeconds : vi . fn ( ) ,
25+ _INTERNAL_performanceTimeToSeconds : vi . fn ( ) ,
2626 timestampInSeconds : vi . fn ( ) ,
2727 getCurrentScope : vi . fn ( ) ,
2828 getClient : vi . fn ( ) ,
@@ -379,7 +379,7 @@ describe('_sendLcpSpan', () => {
379379 beforeEach ( ( ) => {
380380 vi . mocked ( SentryCore . getCurrentScope ) . mockReturnValue ( mockScope as any ) ;
381381 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( 1000 ) ;
382- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockImplementation (
382+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockImplementation (
383383 ( time , entryStartTime = time ) => ( SentryCore . browserPerformanceTimeOrigin ( entryStartTime ) ! + time ) / 1000 ,
384384 ) ;
385385 vi . mocked ( htmlTreeAsString ) . mockImplementation ( ( node : any ) => `<${ node ?. tagName || 'div' } >` ) ;
@@ -517,7 +517,7 @@ describe('_sendClsSpan', () => {
517517 beforeEach ( ( ) => {
518518 vi . mocked ( SentryCore . getCurrentScope ) . mockReturnValue ( mockScope as any ) ;
519519 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( 1000 ) ;
520- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
520+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
521521 vi . mocked ( SentryCore . timestampInSeconds ) . mockReturnValue ( 1.5 ) ;
522522 vi . mocked ( htmlTreeAsString ) . mockImplementation ( ( node : any ) => `<${ node ?. tagName || 'div' } >` ) ;
523523 vi . mocked ( SentryCoreBrowser . startInactiveSpan ) . mockReturnValue ( mockSpan as any ) ;
@@ -611,7 +611,7 @@ describe('_sendClsSpan', () => {
611611
612612 it ( 'falls back to the current time when there is no performance time origin' , ( ) => {
613613 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( undefined ) ;
614- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockReturnValue ( undefined ) ;
614+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockReturnValue ( undefined ) ;
615615
616616 _sendClsSpan ( 0 , undefined ) ;
617617
@@ -634,7 +634,7 @@ describe('_sendInpSpan', () => {
634634 beforeEach ( ( ) => {
635635 vi . mocked ( SentryCore . getCurrentScope ) . mockReturnValue ( mockScope as any ) ;
636636 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( 1000 ) ;
637- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
637+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
638638 vi . mocked ( htmlTreeAsString ) . mockReturnValue ( '<button>' ) ;
639639 vi . mocked ( SentryCoreBrowser . startInactiveSpan ) . mockReturnValue ( mockSpan as any ) ;
640640 vi . mocked ( SentryCore . getActiveSpan ) . mockReturnValue ( undefined ) ;
@@ -697,7 +697,7 @@ describe('_sendInpSpan', () => {
697697 // should still use the old one.
698698 const sleepDurationMs = 3_600_000 ;
699699 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( 1000 + sleepDurationMs ) ;
700- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockImplementation ( time =>
700+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockImplementation ( time =>
701701 time < 500 ? ( 1000 + sleepDurationMs + time ) / 1000 : ( 1000 + time ) / 1000 ,
702702 ) ;
703703
@@ -838,7 +838,7 @@ describe('trackInpAsSpan', () => {
838838
839839 beforeEach ( ( ) => {
840840 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( 1000 ) ;
841- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
841+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
842842 vi . mocked ( SentryCore . getCurrentScope ) . mockReturnValue ( mockScope as any ) ;
843843 vi . mocked ( SentryCore . getActiveSpan ) . mockReturnValue ( undefined ) ;
844844 vi . mocked ( SentryCoreBrowser . startInactiveSpan ) . mockReturnValue ( { end : vi . fn ( ) } as any ) ;
@@ -937,7 +937,7 @@ describe('soft navigation web vitals', () => {
937937 supportedEntryTypes : [ 'largest-contentful-paint' , 'layout-shift' , 'soft-navigation' ] ,
938938 } ) ;
939939 vi . mocked ( SentryCore . browserPerformanceTimeOrigin ) . mockReturnValue ( 1000 ) ;
940- vi . mocked ( SentryCore . performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
940+ vi . mocked ( SentryCore . _INTERNAL_performanceTimeToSeconds ) . mockImplementation ( time => ( 1000 + time ) / 1000 ) ;
941941 vi . mocked ( SentryCore . getCurrentScope ) . mockReturnValue ( mockScope as any ) ;
942942 vi . mocked ( SentryCoreBrowser . startInactiveSpan ) . mockReturnValue ( { end : vi . fn ( ) } as any ) ;
943943 vi . mocked ( SentryCore . spanToJSON ) . mockImplementation (
0 commit comments