Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix render and dispose checks in useQueryLoader tests #4737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

monicatang
Copy link
Contributor

@monicatang monicatang commented Jul 12, 2024

Tests on renderCount would be testing React internals, which is unadvised since the tests may fail depending on the React version, and are probably ok to remove. But, these tests are testing Relay behavior -- whether queries are disposed upon re-render -- so I kept the React renderCount checks to clarify the expected render behavior that is triggering these query disposals.

I updated the renderCount to the correct number for React 19.

According to https://www.internalfb.com/diff/D22752821?transaction_fbid=285140592587921&whitespace=SHOW_ALL, tests on `renderCount` would be testing React internals, which is unadvised since the tests may fail depending on the React version, and are probably ok to remove. But, these tests are testing Relay behavior -- whether queries are disposed upon re-render -- so I kept the React `renderCount` checks to clarify the expected render behavior that is triggering these query disposals.

I updated the `renderCount` to the correct number for React 19.
@facebook-github-bot
Copy link
Contributor

@monicatang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants