mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #309] [MERGED] feat: set up react testing suite #1223
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1223
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/309
Author: @msmps
Created: 11/12/2025
Status: ✅ Merged
Merged: 11/12/2025
Merged by: @kommander
Base:
main← Head:feat/add-react-test-suite-20251112171051📝 Commits (7)
bbcb0f3Update React package with test-utils and layout testsa51fa60chore: update workflow to run tests7f825c6refactor: update import path for testRender in layout testsa56ee22chore: add zig setup step to build workflow1708c56refactor: remove unnecessary blank lines in extmarks multiwidth tests83fe2dfchore: simplify build command in React workflowd34410dchore: update React workflow job name to reflect testing📊 Changes
10 files changed (+703 additions, -26 deletions)
View changed files
📝
.github/workflows/build-react.yml(+12 -2)📝
package.json(+1 -1)📝
packages/core/src/lib/extmarks-multiwidth.test.ts(+0 -5)📝
packages/react/package.json(+4 -0)📝
packages/react/scripts/build.ts(+19 -0)📝
packages/react/src/reconciler/reconciler.ts(+2 -0)📝
packages/react/src/reconciler/renderer.ts(+21 -18)➕
packages/react/src/test-utils.ts(+36 -0)➕
packages/react/tests/__snapshots__/layout.test.tsx.snap(+195 -0)➕
packages/react/tests/layout.test.tsx(+413 -0)📄 Description
Add React Test Suite and Testing Utilities
Summary
Adds testing utils for the React package, including test utilities, layout tests, and workflow integration. The test suite covers basic rendering, layout components, error boundaries, and edge cases.
Changes
Features
packages/react/src/test-utils.ts)testRender()helper function for testing React componentsact()API for testingEnhancements
Enhanced
createRootAPI (packages/react/src/reconciler/renderer.ts)unmount()method toRoottype for proper cleanuprender()functionBuild Updates
CI/CD Integration
Breaking Changes
None - this is purely additive.
Related Issues
N/A
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.