Skip to content

Incompatibility with vitest 3 #188

@mdickopp

Description

@mdickopp

Describe the bug

It seems that solid is incompatible with version 3 of vitest.

The templates from https://github.com/solidjs/templates (js-vitest and ts-vitest) work fine with vitest 2, but when vitest 3 is used, the tests fail with an error.

Your Example Website or App

https://stackblitz.com/edit/solidjs-templates-nbtbgydu

Steps to Reproduce the Bug or Issue

  • Open the provided example.
  • Run npm test.
  • The tests fail with message Error: Client-only API called on the server side. Run client-only code in onMount, or conditionally run client-only component with <Show>..

Expected behavior

I expected the tests to succeed instead of failing with an error message.

Screenshots or Videos

No response

Platform

  • OS: Debian Linux 13
  • Browser: observed with Firefox 134.0.2 or Chromium 132.0.6834.110

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions