How can I mock or stub Keycloak in unit tests?
So basically I have a nuxt plugin to setup Keycloak, how can I mock or stub keycloak during unit tests?
This is my plugin
Then I've tried to stub useNuxtApp like this, ive also tried mocking using mockNuxtImport
But I still get this error
Failed to initialize Keycloak adapter: clientId missing
Can anyone point me in the right direction?2 Replies
Sorry to necro this but did you ever find a solution? Thanks
yeah mocking 'useNuxtApp' seemed to do the trick