Replies: 2 comments 3 replies
-
Without example code, it is hard to say for certain, but my best guess is that the bUnit does not do anything in particular with the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply @egil. I am rendering the component in the So my issue: I was thinking it was either a bUnit renderer issue or some subtle different in behaviour in of the Router when under test. I'm also wondering if it could be a sync context issue. Thanks for confirming there's nothing special in the bUnit renderer regarding |
Beta Was this translation helpful? Give feedback.
-
I hope you don't mind the slightly open-ended question, but I'm struggling with an issue in bUnit compared to the behaviour in Blazor.
It seems to be around the
AuthenticationStateChanged
being raised - specifically, moving from a state of Not Authenticated -> Authenticated.In the Blazor app, when this occurs my
@page
component is removed from the render tree and replaced with a new instance of the same@page
component (I am not 100% why, but possibly because the Blazor renderer treats changes to authentication state as requiring any existing components rendered as "dirty" or "unsafe" and therefore creates brand new instances?).Are you aware of any reason why bUnit might not reproduce this behaviour?
Appreciate it is quite open ended, but any clues may help. I may be able to cut down some code and make a small repro if not.
Beta Was this translation helpful? Give feedback.
All reactions