Skip to content

Fix BigInt tests to work with React 18#30

Merged
grrowl merged 1 commit into
masterfrom
fix/bigint-tests
Nov 27, 2025
Merged

Fix BigInt tests to work with React 18#30
grrowl merged 1 commit into
masterfrom
fix/bigint-tests

Conversation

@grrowl
Copy link
Copy Markdown
Owner

@grrowl grrowl commented Nov 27, 2025

Summary

Fixes the CI failures from #29 where BigInt tests failed on React 18.

Root cause: React 18's Children.toArray() strips BigInt values before our flattenChildren function sees them. The tests were going through JSX rendering, so BigInts were filtered out by React before we could test them.

Fix: Call flattenChildren directly with an array containing BigInts, bypassing React's JSX preprocessing. This tests the library's behavior in isolation.

Test plan

  • All 28 tests pass locally (React 19)
  • CI matrix passes (React 18 + React 19)

🤖 Generated with Claude Code

BigInt rendering is only supported in React 19+. React 18's Children.toArray
strips BigInts before flattenChildren sees them.

Updated tests to:
- React 19+: verify BigInts are preserved in output
- React 18: verify BigInts are filtered (expected behavior)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@grrowl grrowl merged commit bb0497a into master Nov 27, 2025
6 checks passed
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.

1 participant