Skip to content

Function properties in stubs should not render source code #975

Closed
@kfischer-okarin

Description

@kfischer-okarin

Version

1.0.0-beta.25

Reproduction link

https://codesandbox.io/s/135my5kk9j

Steps to reproduce

  1. Go to the Tests tabs and run the test
  2. Check the Console output in the Console tab

What is expected?

wrapper.html() should return something like

<childcomponent-stub clickhandler="[Function]"></childcomponent-stub> 

What is actually happening?

<childcomponent-stub clickhandler="function bound handleClick() {
    [native code]
}"></childcomponent-stub> 

I ran into the bug because the snapshot tests failed on our CI environment, even though I had properly updates the snapshots locally. The failing spot was a Function property which was rendered differently on local and CI environments (due to Istanbuls coverage comments being added).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions