Skip to content

Commit

Permalink
Failing test for math elements
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Nov 13, 2024
1 parent c8c1d91 commit 6b8951a
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineComponent, jitSuite, RenderTest, test } from '../..';

class MathElementTest extends RenderTest {
static suiteName = '<math>';

@test
'<math> element can render'() {
const Bar = defineComponent({}, '<math><msqrt><mi>x</mi></msqrt></math>');

this.renderComponent(Bar);

let el = (s: string) => (this.element as unknown as HTMLElement).querySelector(s);

this.assert.strictEqual(el('math')?.namespaceURI, 'http://www.w3.org/1998/Math/MathML');
this.assert.strictEqual(el('msqrt')?.namespaceURI, 'http://www.w3.org/1998/Math/MathML');
this.assert.strictEqual(el('mi')?.namespaceURI, 'http://www.w3.org/1998/Math/MathML');
}
}

jitSuite(MathElementTest);

0 comments on commit 6b8951a

Please sign in to comment.