Skip to content

Vitest fails with TypeError: Unknown file extension ".jsx"  #157

Description

@aminya

I am trying to test a component using Vitest, but following the documentation fails with this error
https://docs.solidjs.com/guides/testing#adding-testing-packages

TypeError: Unknown file extension ".jsx" for /media/aminya/Linux/GitHub/test/test/node_modules/.pnpm/@corvu+utils@0.2.0_solid-js@1.8.17/node_modules/@corvu/utils/dist/reactivity/index.jsx

My test file is a tsx file. It seems Vitest has trouble loading the .jsx file. My config is the same as the doc.


        "@solidjs/testing-library": "^0.8.8",
        "@testing-library/jest-dom": "^6.4.5",
        "@testing-library/user-event": "^14.5.2",
        "@vitest/coverage-v8": "^1.6.0",
        "@vitest/ui": "^1.6.0",
        "solid-devtools": "^0.30.1",
        "typescript": "^5.4.5",
        "vite": "^5.2.12",
        "vite-plugin-solid": "^2.10.2",
        "vitest": "^1.6.0"
    

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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