Warning when running tests.
Dito-Orkodashvili opened this issue · 1 comments
Dito-Orkodashvili commented
There is an issue when running tests. It logs this warning:
I found the way to hide this warning in the Tooltip component like this:
const setup = async (props = {}) => {
let result;
await act(async () => {
result = await render(<App />);
});
return result;
};
But the issue is that I need to fight these warnings in all component tests where I use this Tooltip component. It even gets worse where the multiple Tooltip elements are rendered. It makes the tests log very messy and unusable.
I really love this library and don't want to drop using it because of this issue.
Reproduction demo
https://codesandbox.io/s/jolly-mclaren-srycv?file=/src/App.test.js
Steps to reproduce the problem
- Just run the tests and look into the console
Package versions
- "@popperjs/core": "2.10.2",
- "react-popper": "2.2.5",
atomiks commented
View here, applies to Popper as well: https://floating-ui.com/docs/react-dom#testing