Skip to content

Find missing tests in iti and iti-react - #50

Open
molszanski wants to merge 2 commits into
feat/add-testsfrom
cursor/find-missing-tests-in-iti-and-iti-react-65f7
Open

Find missing tests in iti and iti-react#50
molszanski wants to merge 2 commits into
feat/add-testsfrom
cursor/find-missing-tests-in-iti-and-iti-react-65f7

Conversation

@molszanski

Copy link
Copy Markdown
Owner

Describe your changes

This PR introduces a suite of high-priority tests to enhance the robustness and reliability of both the iti and iti-react libraries. The new tests address critical production-ready scenarios, focusing on:

  • Error Handling: Verifying proper detection and handling of circular dependencies and propagation of async factory errors in iti.
  • Memory Leak Prevention: Ensuring correct cleanup of event listeners, subscriptions, and cached values upon disposal in iti, and proper component unmounting cleanup in iti-react.
  • Concurrency Safety: Testing safe handling of simultaneous get(), upsert(), add(), dispose(), and getItemSet() operations, as well as race conditions in async factories within iti.
  • React Integration: Validating that iti-react hooks prevent unnecessary re-renders, handle unmounting during async operations, and integrate correctly with disposers and multiple components.

These additions significantly improve coverage for scenarios vital for stable and performant applications.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I did run tests on the whole monorepo

Open in Cursor Open in Web

Co-authored-by: eternalko <eternalko@gmail.com>
@cursor

cursor Bot commented Sep 17, 2025

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@molszanski
molszanski marked this pull request as ready for review September 17, 2025 06:13
Co-authored-by: eternalko <eternalko@gmail.com>
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