Skip to content
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

fix(stubs): function in props should be rendered as a deterministic string #1237

Closed
wants to merge 4 commits into from

Conversation

briwa
Copy link
Contributor

@briwa briwa commented May 20, 2019

This closes #975 and #1209.

I figured that the root cause was the stubs rendering function as it is, while it should just have been a string placeholder. My idea is to override all functions in props to a placeholder, and since it's stubbed, the actual function implementation doesn't really matter (CMIIW).

Let me know if this is good enough, or if you have any feedback. Thanks.

@briwa
Copy link
Contributor Author

briwa commented May 20, 2019

Closing this for now since it seems like I'm breaking some tests in previous versions... Will debug later.

@briwa briwa closed this May 20, 2019
@fallemand
Copy link

Hi @briwa! Did you have the chance to have a look? It would be great to have this working.

@stinovlas
Copy link

Hello! Is this PR moving forward? It's quite annoying to create workarounds for testing snapshots with functions. The proposed solution looks good to me.

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 this pull request may close these issues.

Function properties in stubs should not render source code
3 participants