Skip to content

Add support for renderBody mocking #19

Description

@redonkulus

Description

Add a way to mock renderBody when testing components that use <${input.renderBody}/>

Why

There is currently no way to mock or set the renderBody when testing a marko template.

Possible Implementation & Open Questions

From @DylanPiercey:

import { render, createRenderBody } from "@marko/testing-library";

render(template, {
  renderBody: createRenderBody("<h1>Hi!</h1>")
});

Is this something you're interested in working on?

Maybe, depending on guidance from maintainers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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