test: ensure mmultiscript superscript only is behavoring as subsup

This commit is contained in:
Alexandre Nunes 2020-09-20 16:15:54 -03:00
parent 79e625ad78
commit 169d6271b3
2 changed files with 23 additions and 0 deletions

@ -905,5 +905,15 @@ describe('#convert', () => {
expect(result).toBe('\\left(N a\\right)_{11}^{}');
});
});
describe('with superscript only, without preset', () => {
it('handler it as it were a subsup tag', () => {
const mathml = mathmlStrings.mmultiscriptNoSub;
const result = MathMLToLaTeX.convert(mathml);
expect(result).toBe('\\left(N a\\right)_{}^{+}');
});
});
});
});

@ -1499,3 +1499,16 @@ export const mmultiscriptNoSuper = `<math xmlns="http://www.w3.org/1998/Math/Mat
<none/>
</mmultiscripts>
</math>`;
export const mmultiscriptNoSub = `<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mmultiscripts>
<mrow>
<mi>N</mi>
<mi>a</mi>
</mrow>
<none/>
<mrow>
<mn>+</mn>
</mrow>
</mmultiscripts>
</math>`;