Skip to content

Accept jsdom 31's serializations in two DOM tests - #309

Merged
jonathanKingston merged 1 commit into
mainfrom
claude/project-thread-bxyt0k
Nov 26, 2026
Merged

jonathanKingston merged 1 commit into
mainfrom
claude/project-thread-bxyt0k

Conversation

@jonathanKingston

Copy link
Copy Markdown
Collaborator

Unblocks #307 (jsdom 30.1.3 → 31.0.0), whose build job fails 7 tests in two files. Both failures come from jsdom 31 changing how it serializes, not from a product change:

  • mermaid-viewer.test.ts (6 tests): jsdom 31's cssstyle writes translate(0px, 0px) scale(1.5) as translate(0px) scale(1.5). The tests now read the transform through a small transformOf() helper that spells a one-argument translate(x) as translate(x, 0px). Every non-zero offset assertion is unchanged.
  • table-wrapper.test.ts (1 test): the output goes back through the DOM sanitizer, and jsdom 31's serializer now escapes </> inside attribute values (&lt;b&gt;), as current browsers do. The string assertion accepts either spelling. The existing check that the label parses back to Tableau "<b>" & co and never forms markup still pins the safety property.

Test-only, no source change.

Validation

Once this lands, #307 needs a rebase (·@·d·ependabot r·ebase) to pick it up.


Generated by Claude Code

jsdom 31 (dependabot #307) changes two serializations the tests pinned:
cssstyle now writes translate(0px, 0px) as translate(0px), and the
HTML serializer now escapes < and > inside attribute values. Both are
equivalent to the old spelling. Normalize them in the assertions so the
tests pass on jsdom 30 and 31 alike, and #307's build goes green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F6vooF9c5HQcwhoKCDMHrc
@jonathanKingston
jonathanKingston marked this pull request as ready for review November 26, 2026 01:03
@jonathanKingston
jonathanKingston merged commit 76c1752 into main Nov 26, 2026
8 checks passed
@jonathanKingston
jonathanKingston deleted the claude/project-thread-bxyt0k branch November 26, 2026 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants