I have been following the docs for the Okta Sign In Widget but now I have to test it.
I am using typescript and testing-library, basically my routes inside Security are all SecureRoute excepct for the login and another one, and when I run tests to test my routes, a simple one where I just mock my route and see if there’s a text there, I cannot do it because I believe that since there wasn’t any login mock the test cannot access the SecureRoute, if I try another that’s not a SecureRoute one it works.
I also receive a warning
"An update to Security inside a test was not wrapped in act(…).
When testing, code that causes React state updates should be wrapped into act(…):"
So, What I believe that must be done is mocking the login somehow, but I don’t know how I could do that