[📖] Add a testing guide section
Suggestion
I do not know Qwik well enough to make this page, but it would be really cool if we had a section that explains some things we should know before making some tests. Example: I was having trouble creating a unit test for my component because I kept getting the following error:
QWIK ERROR Code(13): Actual value for useContext(qc-l) can not be found, make sure some ancestor component has set a
value using useContextProvider(). In the browser make sure that the context was used during SSR so its state was
serialized. qc-l Error: Code(13): Actual value for useContext(qc-l) can not be found, make sure some ancestor component
has set a value using useContextProvider().
In the browser make sure that the context was used during SSR so its state was serialized.
Some days later, someone on Qwik's Discord server that i should wrap my component with QwikCityMockProvider . It really frustrated me that I could not find the answer on my own.
Completely agree. I think a testing page in the guides section of the docs covering how to use the @builder.io/qwik/testing package, how to create a test with Qwik, things like when to use the QwikCityMockProvider, etc.
Is that something you could take a stab at @GustavoMelloGit?
@thejackshelton Sadly I am really new at Qwik so i don't know enough to make it
Thanks @GustavoMelloGit now the documentation is explaining how to test Qwik components. So I'm closing this issue for now, feel free to re-open it if it's still an issue for you.