test: add test for menclose radical use case

This commit is contained in:
Alexandre Nunes 2020-10-03 10:35:46 -03:00
parent 6e51e9233e
commit 8a1de24a1c
2 changed files with 22 additions and 0 deletions

@ -425,6 +425,16 @@ describe('#convert', () => {
}); });
}); });
describe('with notation attribute as actuarial', () => {
it('convert menclose tag just joining its content inside actuarial latex equivalent commands', () => {
const mathml = mathmlStrings.mencloseNotationRadical;
const result = MathMLToLaTeX.convert(mathml);
expect(result).toBe('\\sqrt{a + 2}');
});
});
describe('with notation attribute as box', () => { describe('with notation attribute as box', () => {
it('convert menclose tag just joining its content inside boxed command', () => { it('convert menclose tag just joining its content inside boxed command', () => {
const mathml = mathmlStrings.mencloseNotationBox; const mathml = mathmlStrings.mencloseNotationBox;

@ -845,6 +845,18 @@ export const mencloseNotationActuarial = `
</root> </root>
`; `;
export const mencloseNotationRadical = `
<root>
<math>
<menclose notation="radical">
<mi>a</mi>
<mo>+</mo>
<mi>2</mi>
</menclose>
</math>
</root>
`;
export const mencloseNotationBox = ` export const mencloseNotationBox = `
<root> <root>
<math> <math>