@@ -5,13 +5,14 @@ import RunWeb from '../';
55it ( 'Should output a RunWeb' , async ( ) => {
66 const component = TestRenderer . create ( < RunWeb /> ) ;
77 let tree = component . toJSON ( ) ;
8+ console . log ( 'tree:' , tree ) ;
89 if ( tree && ! Array . isArray ( tree ) ) {
910 expect ( tree . type ) . toEqual ( 'iframe' ) ;
1011 expect ( tree . props . title ) . toEqual ( 'Demo Title' ) ;
1112 expect ( tree . props . width ) . toEqual ( '100%' ) ;
1213 expect ( tree . props . height ) . toEqual ( '100%' ) ;
1314 expect ( tree . props . style ) . toEqual ( { border : 0 } ) ;
14- expect ( tree . props . srcDoc ) . toEqual ( '<!DOCTYPE html><html><head></head><body></body></html>' ) ;
15+ expect ( tree . props . srcDoc ) . toBeUndefined ( ) ;
1516 }
1617} ) ;
1718
@@ -24,9 +25,7 @@ it('RunWeb Props js="..."', async () => {
2425 expect ( tree . props . width ) . toEqual ( '100%' ) ;
2526 expect ( tree . props . height ) . toEqual ( '100%' ) ;
2627 expect ( tree . props . style ) . toEqual ( { border : 0 } ) ;
27- expect ( tree . props . srcDoc ) . toEqual (
28- `<!DOCTYPE html><html><head></head><body></body><script type="text/javascript">console.log('hello world!')</script></html>` ,
29- ) ;
28+ expect ( tree . props . srcDoc ) . toBeUndefined ( ) ;
3029 }
3130} ) ;
3231
@@ -39,8 +38,6 @@ it('RunWeb Props css="..."', async () => {
3938 expect ( tree . props . width ) . toEqual ( '100%' ) ;
4039 expect ( tree . props . height ) . toEqual ( '100%' ) ;
4140 expect ( tree . props . style ) . toEqual ( { border : 0 } ) ;
42- expect ( tree . props . srcDoc ) . toEqual (
43- `<!DOCTYPE html><html><head><style>body { color:red; }</style></head><body></body></html>` ,
44- ) ;
41+ expect ( tree . props . srcDoc ) . toBeUndefined ( ) ;
4542 }
4643} ) ;
0 commit comments