You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I don't think this is a bug, but it was the most suitable class I guess)
I have a test which has dependencies on "@testing-library/react@v15.0.7" and "@testing-library/user-event@v14.5.2".
After I installed the "@storybook/test@v8.0.10" library in the same repository, the following warning message displayed:
Warning: An update to Component inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
It seems that the warning is caused by the difference of the version of "@testing-library/dom" (ref).
"@testing-library/react@v15.0.7" has dependency to ^10.0.0 (ref)
@testing-library/user-event@v14.5.2" just has a peerDependency to it
however, "@storybook/test" has dependency of both "user-event@^14.5.2" and "dom@^9.3.4" (ref)
it seems that the peerDependency of "user-event" to "dom" is affected by that and depends on "dom@^9.3.4"
I'm not sure if it is possible for "@storybook/test" to depend on "@testing-library/dom", but I hope it is so.
Describe the bug
(I don't think this is a bug, but it was the most suitable class I guess)
I have a test which has dependencies on "@testing-library/react@v15.0.7" and "@testing-library/user-event@v14.5.2".
After I installed the "@storybook/test@v8.0.10" library in the same repository, the following warning message displayed:
It seems that the warning is caused by the difference of the version of "@testing-library/dom" (ref).
I'm not sure if it is possible for "@storybook/test" to depend on "@testing-library/dom", but I hope it is so.
To Reproduce
git checkout 39dad30be9faa3b5acdd9d228f6414ff55a5c71f
(with @storybook/test)pnpm install
andpnpm test
→ you WILL see the warning messagegit checkout 17f83f29b4c8912d7194d54d9ea284df3191980f
(without @storybook/test)pnpm install
andpnpm test
→ you WILL NOT see the warning messageSystem
Additional context
Now to avoid the dependency problem, I explicitly install "@testing-library/dom@v10.1.0" on my repository.
The text was updated successfully, but these errors were encountered: