test: add msubsup InvalidNumberOfChildrenError
This commit is contained in:
parent
8fc7b608a8
commit
083e564e2d
@ -762,6 +762,16 @@ describe('#convert', () => {
|
||||
|
||||
expect(result).toBe('\\left(x + y\\right)_{0}^{1}');
|
||||
});
|
||||
|
||||
describe('when it have four children', () => {
|
||||
it('throws InvalidNumberOfChildrenError', () => {
|
||||
const mathml = mathmlStrings.msubsupWithFourChildren;
|
||||
|
||||
const result = () => MathMLToLaTeX.convert(mathml);
|
||||
|
||||
expect(result).toThrow(new InvalidNumberOfChildrenError('msubsup', 3, 4));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('given math string with mtext', () => {
|
||||
|
@ -1301,6 +1301,19 @@ export const msubsupWithMrow = `
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const msubsupWithFourChildren = `
|
||||
<root>
|
||||
<math>
|
||||
<msubsup>
|
||||
<mo> ∫ </mo>
|
||||
<mn> 0 </mn>
|
||||
<mn> 1 </mn>
|
||||
<mn> 5 </mn>
|
||||
</msubsup>
|
||||
</math>
|
||||
</root>
|
||||
`;
|
||||
|
||||
export const mtext = `
|
||||
<root>
|
||||
<math xmlns = "http://www.w3.org/1998/Math/MathML">
|
||||
|
Loading…
Reference in New Issue
Block a user