Skip to content

test: Add comprehensive React test suite with SolidJS feature parity - #262

Closed
zenyr wants to merge 7 commits into
anomalyco:mainfrom
zenyr:test/add-react-test
Closed

zenyr wants to merge 7 commits into
anomalyco:mainfrom
zenyr:test/add-react-test

Conversation

@zenyr

@zenyr zenyr commented Nov 4, 2025 •

Copy link
Copy Markdown

Summary

Adds comprehensive test coverage to React reconciler with feature parity to SolidJS tests. 6 logical commits covering testing utilities, rendering, control flow, layout, events, and CJK grapheme rendering analysis. (effectively supersedes #256 albeit different)

Test Results

29 pass ✅
91 skip ⊘ (pre-existing CJK grapheme bugs or unimplemented React components)
0 fail ✅

Coverage

  • Basic text & multiline rendering
  • Conditional rendering (&&, ternary)
  • List rendering with .map()
  • Flexbox layout (row/column, flex-grow)
  • Dimensions (width, height, padding, margin)
  • Positioning (absolute, overflow)
  • Alignment (justify-content, align-items)
  • Mouse events (onMouseEnter, onMouseLeave)
  • Select component events

Commits

  1. React testing utilities (testRender, captureCharFrame)
  2. Basic text rendering tests (2 pass)
  3. Control flow tests (9 pass)
  4. Layout & styling tests (11 pass)
  5. Event handling tests (3 pass)
  6. Textarea and CJK grapheme tests (4 pass, 91 skip)

zenyr added 6 commits November 4, 2025 14:21
testRender() utility for headless component rendering.
captureCharFrame() for rendered output capture.
Simple and multiline text rendering only (CJK tests separated).
Conditional rendering tests (&&, ternary).
List rendering tests with .map().
Fragment and mixed children tests.
Flexbox layout tests (row/column, flex-grow).
Dimension and spacing tests.
Positioning and alignment tests.
Select component event tests.
Mouse event tests (onMouseEnter, onMouseLeave).
Textarea component tests (skipped - not implemented).
Count pattern tests for CJK character rendering.
Punctuation combination tests with CJK.
Debug and hex dump tests for grapheme analysis.
All include TODO comments for investigating rendering issues.
@zenyr
zenyr force-pushed the test/add-react-test branch from 81eff10 to 048fbf3 Compare November 4, 2025 05:22
@msmps msmps self-assigned this Nov 4, 2025
@msmps msmps added the react This relates to the react package label Nov 4, 2025
…verify all tests pass

Merge main branch into test/add-react-test:
- Apply main's latest code style updates and refactoring
- Retain comprehensive layout.test.tsx test coverage and snapshots
- Resolve merge conflicts in test assertions and component rendering tests
- Verify all React package tests pass post-merge
@zenyr

zenyr commented Nov 13, 2025

Copy link
Copy Markdown
Author

Update:

@kommander

Copy link
Copy Markdown
Collaborator

@zenyr yes, this one was testing the CJK issue workaround, which is hopefully fixed. @msmps maintains react and he has plans for it.

@kommander

Copy link
Copy Markdown
Collaborator

Test setup solved in #309

@kommander kommander closed this Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

react This relates to the react package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants