Skip to content

[📖] Overview content guide to testing #6566

Open
@GustavoMelloGit

Description

@GustavoMelloGit

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.

Metadata

Metadata

Assignees

Labels

COMP: DXDeveloper Experience related issueCOMP: docsImprovements or additions to documentationCOMP: qwik-city

Type

No type

Projects

Status

Upcoming

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions