test: add msub InvalidNumberOfChildrenError case
This commit is contained in:
parent
8880e6db64
commit
8fc7b608a8
@ -734,6 +734,16 @@ describe('#convert', () => {
|
||||
expect(result).toMatch('\\left(x + y\\right)_{2 + 2}');
|
||||
});
|
||||
});
|
||||
|
||||
describe('msub tag contains three children', () => {
|
||||
it('throws InvalidNumberOfChildrenError', () => {
|
||||
const mathml = mathmlStrings.msubWithThreeChildren;
|
||||
|
||||
const result = () => MathMLToLaTeX.convert(mathml);
|
||||
|
||||
expect(result).toThrow(new InvalidNumberOfChildrenError('msub', 2, 3));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('given math string with msubsup tag', () => {
|
||||
|
@ -1261,6 +1261,18 @@ export const msubWithMrowOnTopBottom = `
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const msubWithThreeChildren = `
|
||||
<root>
|
||||
<math>
|
||||
<msub>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
<mn>3</mn>
|
||||
</msub>
|
||||
</math>
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const msubsup = `
|
||||
<root>
|
||||
<math>
|
||||
|
Loading…
Reference in New Issue
Block a user