Skip to content

Specify/mock context #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anthony-legay opened this issue Jan 18, 2021 · 1 comment
Closed

Specify/mock context #118

anthony-legay opened this issue Jan 18, 2021 · 1 comment

Comments

@anthony-legay
Copy link

Hi ! My question is pretty simple:
I was wondering if there was any way to mock or pass a test context with the render function ?

@MirrorBytes
Copy link
Collaborator

Do you mean using getContext/setContext? You could pass a prop into the render call that will be used to set the context. Or you can wrap your target component in a faux component that sets a context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants