Skip to content

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

Closed
briwa wants to merge 4 commits into
vuejs:devfrom
briwa:fix-props-function-stubs
Closed

fix(stubs): function in props should be rendered as a deterministic string#1237
briwa wants to merge 4 commits into
vuejs:devfrom
briwa:fix-props-function-stubs

Conversation

@briwa

@briwa briwa commented May 20, 2019

Copy link
Copy Markdown

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

briwa commented May 20, 2019

Copy link
Copy Markdown
Author

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
Copy Markdown

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

@stinovlas

Copy link
Copy Markdown

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