From de1899b5a5de5e5169b0d6339a1d3cb2c7f6a79a Mon Sep 17 00:00:00 2001 From: Caio Pizzol Date: Wed, 15 Apr 2026 17:45:12 -0700 Subject: [PATCH] fix(test): scope m:nary supHide assertion to operator wrapper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The union-with-supHide assertion checked for any in the whole element, but the scenario 6 fixture body contains (Aᵢ), which legitimately renders as . That made the test fail on every run since it landed. Assert on the n-ary's own wrapper (the parent of ) instead, which is what the test was actually trying to verify. --- tests/behavior/tests/importing/math-equations.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/behavior/tests/importing/math-equations.spec.ts b/tests/behavior/tests/importing/math-equations.spec.ts index 59384714bf..cee7ebbc04 100644 --- a/tests/behavior/tests/importing/math-equations.spec.ts +++ b/tests/behavior/tests/importing/math-equations.spec.ts @@ -957,14 +957,18 @@ test.describe('m:nary (n-ary operator) rendering', () => { const math = document.querySelectorAll('math')[5]; const munder = math?.querySelector('munder'); if (!munder) return null; + // The n-ary body contains m:sSub (Aᵢ), which legitimately renders as . + // Assert only on the n-ary's own wrapper — the element parenting . + const unionOp = Array.from(math.querySelectorAll('mo')).find((m) => m.textContent === '\u22C3'); + const naryWrapperTag = unionOp?.parentElement?.tagName.toLowerCase(); return { - hasMsub: math?.querySelector('msub') !== null, + naryWrapperTag, opChar: munder.children[0]?.textContent, under: munder.children[1]?.textContent, }; }); expect(data).not.toBeNull(); - expect(data!.hasMsub).toBe(false); + expect(data!.naryWrapperTag).toBe('munder'); expect(data!.opChar).toBe('\u22C3'); expect(data!.under).toBe('i'); });