Skip to content

Support for renderer options in server-test-utils #1665

Open
@okoghenun

Description

@okoghenun

Feature Description

An optional server-side rendering config object for the Vue server-side renderer when rendering components using server-test-utils.

Proposed API:

await render(Component, mountOptions, ssrOptions) 

Problem

Projects that use SSR specific configuration like cache or directives have no way of passing those configurations to the render uses in server-test-utils. This leads to rendering errors/warnings caused by missing configuration in which the component been tested depends on.

For my specific use case, we heavily use serverCacheKey within components to speed up server-side rendering which causes a lot of warnings from Vue in our tests as no cache was provided to the renderer.

Expected behaviour

The SSR options passed to the render in server-test-utils is used to initialize Vue's server-side renderer.

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