[PR #209] [CLOSED] Add support for testing React components #1155

Closed
opened 2026-03-14 09:21:19 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/209
Author: @remorses
Created: 10/9/2025
Status: Closed

Base: mainHead: react-test-render


📝 Commits (5)

📊 Changes

5 files changed (+125 additions, -18 deletions)

View changed files

📝 packages/core/src/testing/test-renderer.ts (+17 -4)
📝 packages/react/src/reconciler/host-config.ts (+10 -1)
📝 packages/react/src/reconciler/reconciler.ts (+2 -2)
packages/react/src/reconciler/renderer.test.tsx (+69 -0)
📝 packages/react/src/reconciler/renderer.ts (+27 -11)

📄 Description

Added support for passing a custom renderer in React render and make it wait until React commits

I added a ready field to the TestRenderer to be able to await the React commit. Because React renders asynchronously


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/209 **Author:** [@remorses](https://github.com/remorses) **Created:** 10/9/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `react-test-render` --- ### 📝 Commits (5) - [`8e96ae7`](https://github.com/anomalyco/opentui/commit/8e96ae7c30d5de5a608e24cac2cbb9b0cea10dca) add support for testing react components - [`f91f4c9`](https://github.com/anomalyco/opentui/commit/f91f4c932c384af56caf66f317ffddd00b24b0bb) add support for awaiting React render - [`d05f868`](https://github.com/anomalyco/opentui/commit/d05f8681bf8f25152e8202cde0e3f380cb5e8590) update snapshots - [`8322e96`](https://github.com/anomalyco/opentui/commit/8322e963380070eb6078732aa26eaa26e3df9bd5) fix ai slop - [`0b6b1e6`](https://github.com/anomalyco/opentui/commit/0b6b1e6893e09223cc27d5cf528b84f59691577e) Update renderer.test.tsx ### 📊 Changes **5 files changed** (+125 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/testing/test-renderer.ts` (+17 -4) 📝 `packages/react/src/reconciler/host-config.ts` (+10 -1) 📝 `packages/react/src/reconciler/reconciler.ts` (+2 -2) ➕ `packages/react/src/reconciler/renderer.test.tsx` (+69 -0) 📝 `packages/react/src/reconciler/renderer.ts` (+27 -11) </details> ### 📄 Description Added support for passing a custom renderer in React render and make it wait until React commits I added a ready field to the TestRenderer to be able to await the React commit. Because React renders asynchronously --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:21:19 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1155
No description provided.