Skip to content

Using jest-dom in vite setup with nx can't resolve typescript types.  #540

Open
@shubhamdeol

Description

@shubhamdeol
  • @testing-library/jest-dom version: 6.1.4
  • node version: 20.3.1
  • vitest version:~0.32.0
  • npm version: 9.6.7

Relevant code or config:

vitest-setup.ts

import '@testing-library/jest-dom/vitest';

tsConfig include

"include": [
    "src/**/*.js",
    "src/**/*.jsx",
    "src/**/*.ts",
    "src/**/*.tsx",
  ]
Screenshot 2023-10-23 at 5 14 51 PM

Problem description:

I am using vite with nx setup. I am trying to use jest-dom. Tests is running fine. But I am not able to resolve typescript type.
I have followed the doc properly.

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