File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1335,7 +1335,7 @@ describe('reactElementToJSXString(ReactElement)', () => {
1335
1335
expect ( reactElementToJSXString ( < Lazy /> ) ) . toEqual ( `<Lazy />` ) ;
1336
1336
} ) ;
1337
1337
1338
- it ( 'should not crash when stringifying circular `forwardRef` element ' , ( ) => {
1338
+ it ( 'should stringify `forwardRef` elenet with a circular property ' , ( ) => {
1339
1339
function TagList ( { tags } ) {
1340
1340
return tags ;
1341
1341
}
@@ -1345,10 +1345,14 @@ describe('reactElementToJSXString(ReactElement)', () => {
1345
1345
} ) ;
1346
1346
Tag . emotionReal = Tag ;
1347
1347
1348
- expect ( ( ) =>
1348
+ expect (
1349
1349
reactElementToJSXString (
1350
1350
< TagList tags = { [ < Tag key = "oops" text = "oops, circular" /> ] } />
1351
1351
)
1352
- ) . not . toThrow ( ) ;
1352
+ ) . toEqual ( `<TagList
1353
+ tags={[
1354
+ <Tag key="oops" text="oops, circular"/>
1355
+ ]}
1356
+ />` ) ;
1353
1357
} ) ;
1354
1358
} ) ;
You can’t perform that action at this time.
0 commit comments