From 8a1de24a1ccd3c8e49bc9965bd79c558dff70341 Mon Sep 17 00:00:00 2001 From: Alexandre Nunes Date: Sat, 3 Oct 2020 10:35:46 -0300 Subject: [PATCH] test: add test for menclose radical use case --- __test__/index.test.ts | 10 ++++++++++ __test__/mocks/mathmlStrings.ts | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/__test__/index.test.ts b/__test__/index.test.ts index c6786e7..56f7b44 100755 --- a/__test__/index.test.ts +++ b/__test__/index.test.ts @@ -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', () => { it('convert menclose tag just joining its content inside boxed command', () => { const mathml = mathmlStrings.mencloseNotationBox; diff --git a/__test__/mocks/mathmlStrings.ts b/__test__/mocks/mathmlStrings.ts index a76bb31..a58c367 100755 --- a/__test__/mocks/mathmlStrings.ts +++ b/__test__/mocks/mathmlStrings.ts @@ -845,6 +845,18 @@ export const mencloseNotationActuarial = ` `; +export const mencloseNotationRadical = ` + + + + a + + + 2 + + + +`; + export const mencloseNotationBox = `