@@ -5,7 +5,7 @@ import { useKeyedState } from '@edx/react-unit-test-utils';
55import { logError } from '@edx/frontend-platform/logging' ;
66import { mockBroadcastChannel } from '../../data/api.mock' ;
77import { iframeMessageTypes , iframeStateKeys } from '../../../constants' ;
8- import { useIFrameBehavior } from '../useIFrameBehavior ' ;
8+ import { useIframeBehavior } from '../useIframeBehavior ' ;
99import { useLoadBearingHook } from '../useLoadBearingHook' ;
1010
1111jest . useFakeTimers ( ) ;
@@ -20,7 +20,7 @@ jest.mock('@edx/frontend-platform/logging', () => ({
2020
2121mockBroadcastChannel ( ) ;
2222
23- describe ( 'useIFrameBehavior ' , ( ) => {
23+ describe ( 'useIframeBehavior ' , ( ) => {
2424 const id = 'test-id' ;
2525 const iframeUrl = 'http://example.com' ;
2626 const setIframeHeight = jest . fn ( ) ;
@@ -52,7 +52,7 @@ describe('useIFrameBehavior', () => {
5252 } ) ;
5353
5454 it ( 'initializes state correctly' , ( ) => {
55- const { result } = renderHook ( ( ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) ) ;
55+ const { result } = renderHook ( ( ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) ) ;
5656
5757 expect ( result . current . iframeHeight ) . toBe ( 0 ) ;
5858 expect ( result . current . showError ) . toBe ( false ) ;
@@ -69,7 +69,7 @@ describe('useIFrameBehavior', () => {
6969 return [ null , jest . fn ( ) ] ;
7070 } ) ;
7171
72- renderHook ( ( ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) ) ;
72+ renderHook ( ( ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) ) ;
7373
7474 const message = {
7575 data : {
@@ -86,7 +86,7 @@ describe('useIFrameBehavior', () => {
8686 } ) ;
8787
8888 it ( 'handles resize message correctly' , ( ) => {
89- renderHook ( ( ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) ) ;
89+ renderHook ( ( ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) ) ;
9090
9191 const message = {
9292 data : {
@@ -105,7 +105,7 @@ describe('useIFrameBehavior', () => {
105105
106106 it ( 'handles xblock-event message correctly' , ( ) => {
107107 const onBlockNotification = jest . fn ( ) ;
108- renderHook ( ( ) => useIFrameBehavior ( {
108+ renderHook ( ( ) => useIframeBehavior ( {
109109 id, iframeUrl, iframeRef, onBlockNotification,
110110 } ) ) ;
111111
@@ -130,7 +130,7 @@ describe('useIFrameBehavior', () => {
130130 } ) ;
131131
132132 it ( 'handles videoFullScreen message correctly' , ( ) => {
133- renderHook ( ( ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) ) ;
133+ renderHook ( ( ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) ) ;
134134
135135 const message = {
136136 data : {
@@ -148,7 +148,7 @@ describe('useIFrameBehavior', () => {
148148
149149 it ( 'handles offset message correctly' , ( ) => {
150150 document . body . innerHTML = '<div id="unit-iframe" style="position: absolute; top: 50px;"></div>' ;
151- renderHook ( ( ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) ) ;
151+ renderHook ( ( ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) ) ;
152152
153153 const message = {
154154 data : { offset : 100 } ,
@@ -162,7 +162,7 @@ describe('useIFrameBehavior', () => {
162162 } ) ;
163163
164164 it ( 'handles iframe load error correctly' , ( ) => {
165- const { result } = renderHook ( ( ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) ) ;
165+ const { result } = renderHook ( ( ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) ) ;
166166
167167 act ( ( ) => {
168168 result . current . handleIFrameLoad ( ) ;
@@ -176,7 +176,7 @@ describe('useIFrameBehavior', () => {
176176
177177 it ( 'resets state when iframeUrl changes' , ( ) => {
178178 // eslint-disable-next-line @typescript-eslint/no-shadow
179- const { rerender } = renderHook ( ( { id, iframeUrl } ) => useIFrameBehavior ( { id, iframeUrl, iframeRef } ) , {
179+ const { rerender } = renderHook ( ( { id, iframeUrl } ) => useIframeBehavior ( { id, iframeUrl, iframeRef } ) , {
180180 initialProps : { id, iframeUrl } ,
181181 } ) ;
182182
0 commit comments