Skip to content

Add support for shallow rendering #1412

@ilyvion

Description

@ilyvion

Shallow rendering is very useful for unit testing components in isolation. You can read React's documentation on it to get a better sense of what exactly it is, but a quick explanation is that it renders the component, but not any child components. In other words, if component Foo's rendering is

html! {
    <div>
        <span>Hello World!</span>
        <Bar baz="qux" />
    </div>
}

then a shallow render would output

<div>
    <span>Hello World!</span>
    <Bar baz="qux" />
</div>

Questionnaire

  • I'm interested in implementing this myself but don't know where to start
  • I would like to add this feature
  • I don't have time to add this right now, but maybe later

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions