@@ -56,9 +56,8 @@ describe('domToReact', () => {
5656 } ) ;
5757
5858 it ( 'does not throw an error for void elements' , ( ) => {
59- const reactElements = domToReact ( htmlToDOM ( html . void ) ) ;
6059 expect ( ( ) => {
61- render ( < div > { reactElements } </ div > ) ;
60+ render ( < div > { domToReact ( htmlToDOM ( html . void ) ) } </ div > ) ;
6261 } ) . not . toThrow ( ) ;
6362 } ) ;
6463
@@ -80,8 +79,11 @@ describe('domToReact', () => {
8079 } ) ;
8180
8281 it ( 'converts custom element with attributes' , ( ) => {
83- const reactElement = domToReact ( htmlToDOM ( html . customElement ) ) ;
84- expect ( reactElement ) . toMatchSnapshot ( ) ;
82+ expect ( domToReact ( htmlToDOM ( html . customElement ) ) ) . toMatchSnapshot ( ) ;
83+ } ) ;
84+
85+ it ( 'converts LaTeX' , ( ) => {
86+ expect ( domToReact ( htmlToDOM ( html . latex ) ) ) . toMatchSnapshot ( ) ;
8587 } ) ;
8688} ) ;
8789
@@ -104,7 +106,7 @@ describe('library option', () => {
104106 expect ( React . isValidElement ( parsedElement ) ) . toBe ( false ) ;
105107 expect ( Preact . isValidElement ( parsedElement ) ) . toBe ( true ) ;
106108 // remove `__v` key since it's causing test equality to fail
107- // @ts -expect-error Property '__v' does not exist on type '...roperty '__v' does not exist on type ' string'.
109+ // @ts -expect-error Property '__v' does not exist on type 'string'.
108110 delete parsedElement . __v ;
109111 delete preactElement . __v ;
110112 expect ( parsedElement ) . toEqual ( preactElement ) ;
0 commit comments