@@ -56,9 +56,8 @@ describe('domToReact', () => {
56
56
} ) ;
57
57
58
58
it ( 'does not throw an error for void elements' , ( ) => {
59
- const reactElements = domToReact ( htmlToDOM ( html . void ) ) ;
60
59
expect ( ( ) => {
61
- render ( < div > { reactElements } </ div > ) ;
60
+ render ( < div > { domToReact ( htmlToDOM ( html . void ) ) } </ div > ) ;
62
61
} ) . not . toThrow ( ) ;
63
62
} ) ;
64
63
@@ -80,8 +79,11 @@ describe('domToReact', () => {
80
79
} ) ;
81
80
82
81
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 ( ) ;
85
87
} ) ;
86
88
} ) ;
87
89
@@ -104,7 +106,7 @@ describe('library option', () => {
104
106
expect ( React . isValidElement ( parsedElement ) ) . toBe ( false ) ;
105
107
expect ( Preact . isValidElement ( parsedElement ) ) . toBe ( true ) ;
106
108
// 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'.
108
110
delete parsedElement . __v ;
109
111
delete preactElement . __v ;
110
112
expect ( parsedElement ) . toEqual ( preactElement ) ;
0 commit comments