Skip to content

fix(test): scope m:nary supHide assertion to operator wrapper#2833

Merged
caio-pizzol merged 1 commit intomainfrom
caio/fix-nary-munder-test-assertion
Apr 16, 2026
Merged

fix(test): scope m:nary supHide assertion to operator wrapper#2833
caio-pizzol merged 1 commit intomainfrom
caio/fix-nary-munder-test-assertion

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

The behavior test math-equations.spec.ts:951 ("union with supHide renders as ") has been failing on main and every PR since it landed in #2752. The converter is correct — the test assertion was overly broad.

  • Scenario 6 in math-nary-tests.docx has <m:sSub> (Aᵢ) in the n-ary body <m:e>, which legitimately renders as <msub> via the m:sSub converter (feat(math): implement m:sSub subscript converter (SD-2373) #2635).
  • The old assertion math.querySelector('msub') !== null picked up that body <msub>, not the n-ary's own wrapper choice, so it always failed.
  • New assertion locates the <mo>⋃</mo> and checks its parent tag is <munder> — which is what the test actually intends to verify.
  • Verified locally: failing test now passes; all 72 math-equations tests pass on chromium.

The union-with-supHide assertion checked for any <msub> in the whole
<math> element, but the scenario 6 fixture body contains <m:sSub>
(Aᵢ), which legitimately renders as <msub>. That made the test fail
on every run since it landed. Assert on the n-ary's own wrapper
(the parent of <mo>⋃</mo>) instead, which is what the test was
actually trying to verify.
@caio-pizzol caio-pizzol enabled auto-merge April 16, 2026 00:47
@caio-pizzol caio-pizzol self-assigned this Apr 16, 2026
@caio-pizzol caio-pizzol disabled auto-merge April 16, 2026 01:08
@caio-pizzol caio-pizzol merged commit 3428fc9 into main Apr 16, 2026
8 of 15 checks passed
@caio-pizzol caio-pizzol deleted the caio/fix-nary-munder-test-assertion branch April 16, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant