Skip to content

Run FE tests in an actual browser using vitest browser mode #559

@acelaya

Description

@acelaya

We are currently running tests using vitest workespaces, with either node or jsdom environment, matching the right workspace by checking if the test file contains the server keyword.

This means route tests are currently running in jsdom, whcih is correct for the component piece, but the loader and action should run in the node environment. They happen to work because jsdom is effectively node with the addition of some browser APIs.

If we replace jsdom with an actual browser, node APIs won't be available anymore, so we need to make sure the route and loader functions for route modules still runs in node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions