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
For our unit testing we use snapshot testing to ensure no random component changes and to have a text-based view of the component tree during manual review. This often causes problems with Toasts however as we have a lot of async data (using msw in tests) and sometimes toasts are present and sometimes they aren't which then causes the snapshot to fail. We have attempted several workarounds for this issue and for some scenarios these have worked, but ultimately they are hacks and not ideal. If this library could provide a component such as TestToastContainer that functionally works the same as ToastContainer but whose children are always empty so the rendered DOM tree is always the same that would solve our problems.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
N.A.
What is the expected behavior?
N.A.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
react: 18.3.1
react-toastify: 10.0.5
The text was updated successfully, but these errors were encountered:
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
For our unit testing we use snapshot testing to ensure no random component changes and to have a text-based view of the component tree during manual review. This often causes problems with Toasts however as we have a lot of async data (using msw in tests) and sometimes toasts are present and sometimes they aren't which then causes the snapshot to fail. We have attempted several workarounds for this issue and for some scenarios these have worked, but ultimately they are hacks and not ideal. If this library could provide a component such as
TestToastContainer
that functionally works the same asToastContainer
but whose children are always empty so the rendered DOM tree is always the same that would solve our problems.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
N.A.
What is the expected behavior?
N.A.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
react: 18.3.1
react-toastify: 10.0.5
The text was updated successfully, but these errors were encountered: