From 6b8951a3a4e0737194e3063532190452d6dd0e0e Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:23:15 -0500 Subject: [PATCH] Failing test for math elements --- .../integration-tests/test/html/math-test.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/@glimmer-workspace/integration-tests/test/html/math-test.ts diff --git a/packages/@glimmer-workspace/integration-tests/test/html/math-test.ts b/packages/@glimmer-workspace/integration-tests/test/html/math-test.ts new file mode 100644 index 000000000..be0ab0c4b --- /dev/null +++ b/packages/@glimmer-workspace/integration-tests/test/html/math-test.ts @@ -0,0 +1,20 @@ +import { defineComponent, jitSuite, RenderTest, test } from '../..'; + +class MathElementTest extends RenderTest { + static suiteName = ''; + + @test + ' element can render'() { + const Bar = defineComponent({}, 'x'); + + 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);