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

test: enable <StrictMode/> for testing #2721

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

promer94
Copy link
Collaborator

  • aggregate stale tests into a single group
  • collect render info in <Profiler /> onRender props instead of function body.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8b2b75f:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

@promer94 promer94 marked this pull request as draft July 22, 2023 13:42
@@ -42,7 +45,8 @@ export const renderWithConfig = (
element: React.ReactElement,
config?: Parameters<typeof _renderWithConfig>[1]
): ReturnType<typeof _renderWithConfig> => {
const provider = () => new Map()
const cache = new Map()
const provider = () => cache
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In <StrictMode />, provider will be called twice.

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.

None yet

1 participant