test: add mfrac InvalidNumberOfChildren error case
This commit is contained in:
parent
38fad7a173
commit
bbc85a0b0f
@ -321,6 +321,15 @@ describe('#convert', () => {
|
||||
expect(result).toMatch('1/\\left(x^{3} + 3\\right)');
|
||||
});
|
||||
});
|
||||
|
||||
describe('containing three children', () => {
|
||||
it('throws InvalidNumberOfChildren Error', () => {
|
||||
const mathml = mathmlStrings.mfracWithThreeChildren;
|
||||
|
||||
const result = () => MathMLToLaTeX.convert(mathml);
|
||||
expect(result).toThrow(new InvalidNumberOfChild('mfrac', 2, 3));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('given math string with mroot containing two content', () => {
|
||||
|
@ -667,6 +667,18 @@ export const shortMFrac = `
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const mfracWithThreeChildren = `
|
||||
<root>
|
||||
<math>
|
||||
<mfrac>
|
||||
<mi>x</mi>
|
||||
<mn>3</mn>
|
||||
<mi>2</mi>
|
||||
</mfrac>
|
||||
</math>
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const mroot = `
|
||||
<root>
|
||||
<math>
|
||||
|
Loading…
Reference in New Issue
Block a user