Component in test is not updating despite signal change
I am currently writing some tests for a library I'm building with Solid. I have the following test:
So the context summary is, I have two primary things under test:
SSOProvider
and the useSSO
hook. As you can see above, I have an internal test component called AuthStateComponent
that is using the useSSO
to either show an authenticated or unauthenticated view. The issue is, when I run my test and trigger a user update, the test component does not re-render to show the authenticated view. It always remains in the unauthenticated despite the fact the user has been updated internally within useSSO
(I verified this via console logging everything).
So that little createEffect log that I have within the test component only ever runs once, outputting a null
, and it does not re-run after the user signal updates internally.
I'm currently stuck in testing this particular area and can't proceed. Not sure exactly what I'm doing wrong here.1 Reply
I would do a sanity check and test some code that you know 100% will work. Like counter going up and
testEffect
checking it.
My guess is that something is wrong in the environment.