@@ -5,13 +5,14 @@ import RunWeb from '../';
5
5
it ( 'Should output a RunWeb' , async ( ) => {
6
6
const component = TestRenderer . create ( < RunWeb /> ) ;
7
7
let tree = component . toJSON ( ) ;
8
+ console . log ( 'tree:' , tree ) ;
8
9
if ( tree && ! Array . isArray ( tree ) ) {
9
10
expect ( tree . type ) . toEqual ( 'iframe' ) ;
10
11
expect ( tree . props . title ) . toEqual ( 'Demo Title' ) ;
11
12
expect ( tree . props . width ) . toEqual ( '100%' ) ;
12
13
expect ( tree . props . height ) . toEqual ( '100%' ) ;
13
14
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 ( ) ;
15
16
}
16
17
} ) ;
17
18
@@ -24,9 +25,7 @@ it('RunWeb Props js="..."', async () => {
24
25
expect ( tree . props . width ) . toEqual ( '100%' ) ;
25
26
expect ( tree . props . height ) . toEqual ( '100%' ) ;
26
27
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 ( ) ;
30
29
}
31
30
} ) ;
32
31
@@ -39,8 +38,6 @@ it('RunWeb Props css="..."', async () => {
39
38
expect ( tree . props . width ) . toEqual ( '100%' ) ;
40
39
expect ( tree . props . height ) . toEqual ( '100%' ) ;
41
40
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 ( ) ;
45
42
}
46
43
} ) ;
0 commit comments