diff --git a/__test__/index.test.ts b/__test__/index.test.ts index 1e26026..96c9710 100755 --- a/__test__/index.test.ts +++ b/__test__/index.test.ts @@ -1108,6 +1108,56 @@ describe('#convert', () => { }); }); + describe('where its first child is a mrow and second is mo containing hat mo as utf-8', () => { + test('wrap it content inside hat command', () => { + const mathml = ` + + + + + x + + + y + + + z + + ^ + + + + `; + + const result = MathMLToLaTeX.convert(mathml); + + expect(result).toBe('\\hat{x + y + z}'); + }); + }); + + describe('where its first child is a mrow and second is mo containing hat mo as encoded', () => { + test('wrap it content inside hat command', () => { + const mathml = ` + + + + + x + + + y + + + z + + ˆ + + + + `; + + const result = MathMLToLaTeX.convert(mathml); + + expect(result).toBe('\\hat{x + y + z}'); + }); + }); + describe('where its first child is a mrow and second is mo containing generic char', () => { test('wrap it content inside overset making generic char on top', () => { const mathml = `