test(sankey): add tests for special characters in node names#7545
test(sankey): add tests for special characters in node names#7545cyphercodes wants to merge 3 commits intomermaid-js:developfrom
Conversation
Add explicit test cases for special characters (single quotes, ampersands, forward slashes, and hyphens) in Sankey diagram node names. These tests verify the fix for issue mermaid-js#7528 where special characters in node names like 'Agricultural \'waste\'', 'Lighting & appliances', and 'Over generation / exports' are correctly parsed. The tests confirm that both 'sankey' and 'sankey-beta' syntax properly handle these characters in CSV-style diagram definitions.
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7545 +/- ##
=======================================
Coverage 3.34% 3.34%
=======================================
Files 524 524
Lines 55309 55309
Branches 795 795
=======================================
Hits 1850 1850
Misses 53459 53459
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Summary
This PR adds explicit test cases for special characters in Sankey diagram node names to verify and document support for these characters.
Related Issue
Fixes #7528 - Sankey Diagram Parsing Failure: Special Characters in Node Names Trigger "Syntax error in text"
Changes
sankey.spec.ts:Test Coverage
The tests verify that the following special characters are correctly parsed in node names:
Agricultural 'waste'Lighting & appliancesOver generation / exportsHeating and cooling - homesVerification
The tests confirm that the parser already correctly handles these characters. The issue reported in #7528 appears to have been resolved in the current version (v11.13.0).
Checklist