Skip to content

SolidJS tests not working with Astro #12256

Open
@PeterDraex

Description

Astro Info

Astro                    v4.16.6
Node                     v18.20.3
System                   Linux (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

The new SolidJS documentation has a tutorial how to setup testing. I followed it and it resulted in this error:
FAIL src/components/Counter.test.jsx [ src/components/Counter.test.jsx ]
TypeError: Cannot read properties of undefined (reading 'Symbol(Node prepared with document state workarounds)')

After a lot of trial/error, I think it's not working because astro doesn't use the official vite-plugin-solid package for integration. I found a previous mention that this was considered, so I wanted to bring it to attention as it would fix the testing (I think).

What's the expected result?

Passing test

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-pqy8j7-m47wdw?file=src%2Fpages%2Findex.astro

cc @bluwy

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)pkg: solidRelated to Solid (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions