File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -82,4 +82,17 @@ it('renders <IFrame head="..." /> test case', async () => {
8282 await waitFor ( ( ) => {
8383 expect ( container . innerHTML ) . toEqual ( `<iframe srcdoc="<!DOCTYPE html><html><head></head><body></body></html>"></iframe>` ) ;
8484 } ) ;
85- } ) ;
85+ } ) ;
86+
87+ it ( 'renders <IFrame mountTarget="..." /> test case' , async ( ) => {
88+ const initialContent = '<!DOCTYPE html><html><head></head><body><h1>i wont be changed</h1><div id="mountHere"></div></body></html>' ;
89+ const { container } = render (
90+ < IFrame initialContent = { initialContent } mountTarget = "#mountHere" >
91+ < div style = { { fontSize : 32 , color : 'red' } } > Hello World!</ div >
92+ </ IFrame >
93+ ) ;
94+ await waitFor ( ( ) => {
95+ expect ( container . innerHTML ) . toEqual ( `<iframe srcdoc=\"<!DOCTYPE html><html><head></head><body><h1>i wont be changed</h1><div id="mountHere"></div></body></html>\"></iframe>` ) ;
96+ } ) ;
97+ } ) ;
98+
You can’t perform that action at this time.
0 commit comments