Skip to content

Commit

Permalink
test: Remove perhaps superfluous mathml tests for the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Apr 30, 2024
1 parent 7f3d7cb commit 9c4c61b
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions test/browser/mathml.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,50 +49,6 @@ describe('mathml', () => {
expect(namespace).to.equal('http://www.w3.org/1998/Math/MathML');
});

it('should use attributes for className', () => {
const Demo = ({ c }) => (
<math {...(c ? { class: 'foo_' + c } : {})}>
<msup>
<mi>c</mi>
<mn>2</mn>
</msup>
</math>
);
render(<Demo c="1" />, scratch);
let root = scratch.firstChild;
sinon.spy(root, 'removeAttribute');
render(<Demo />, scratch);
expect(root.removeAttribute).to.have.been.calledOnce.and.calledWith(
'class'
);

root.removeAttribute.restore();

render(<div />, scratch);
render(<Demo />, scratch);
root = scratch.firstChild;
sinon.spy(root, 'setAttribute');
render(<Demo c="2" />, scratch);
expect(root.setAttribute).to.have.been.calledOnce.and.calledWith(
'class',
'foo_2'
);

root.setAttribute.restore();
});

it('should support class attribute', () => {
render(<math class="foo bar" />, scratch);

expect(scratch.innerHTML).to.contain(` class="foo bar"`);
});

it('should support className attribute', () => {
render(<math className="foo bar" />, scratch);

expect(scratch.innerHTML).to.contain(` class="foo bar"`);
});

it('should transition from DOM to MathML and back', () => {
render(
<div>
Expand Down

0 comments on commit 9c4c61b

Please sign in to comment.