@@ -120,7 +120,7 @@ describe("useScrollDepth", () => {
120120 it ( "logs max scroll depth on unmount when attached to a container" , ( ) => {
121121 // Use a real component so the ref is attached before useEffect runs
122122 function ScrollComponent ( ) {
123- const scrollRef = useScrollDepth ( "page.scroll_depth" , {
123+ const scrollRef = useScrollDepth < HTMLDivElement > ( "page.scroll_depth" , {
124124 path : "/about" ,
125125 } ) ;
126126 return < div ref = { scrollRef } data-testid = "scroller" /> ;
@@ -155,7 +155,7 @@ describe("useScrollDepth", () => {
155155
156156 it ( "tracks maximum scroll depth, not final position" , ( ) => {
157157 function ScrollComponent ( ) {
158- const scrollRef = useScrollDepth ( "scroll.depth" ) ;
158+ const scrollRef = useScrollDepth < HTMLDivElement > ( "scroll.depth" ) ;
159159 return < div ref = { scrollRef } data-testid = "scroller" /> ;
160160 }
161161
@@ -198,7 +198,7 @@ describe("useScrollDepth", () => {
198198
199199 it ( "does not log if no scrolling occurred" , ( ) => {
200200 function ScrollComponent ( ) {
201- const scrollRef = useScrollDepth ( "scroll.depth" ) ;
201+ const scrollRef = useScrollDepth < HTMLDivElement > ( "scroll.depth" ) ;
202202 return < div ref = { scrollRef } data-testid = "scroller" /> ;
203203 }
204204
0 commit comments