Skip to content

act warning with vitest when forcing module resolution with vitejs #1213

@KevinEonix

Description

@KevinEonix

Reproduction example

https://github.com/KevinEonix/DevExpressVitestError

Prerequisites

  • Trigger the test for the FormForTest

Expected behavior

not returning the warning for act

Actual behavior

It return an act warning when awaiting the call to userEvent

User-event version

14.5.2

Environment

Testing Library framework:

  • "@testing-library/jest-dom": "^6.4.5",
  • "@testing-library/react": "^15.0.7",
  • "@testing-library/user-event": "^14.5.2",

JS framework:

  • react@18.2.0

Test environment:

  • "@vitejs/plugin-react": "^4.2.1",
  • "@vitest/coverage-istanbul": "^1.6.0",
  • "vite": "^5.2.11",
  • "vitest": "^1.6.0"

DOM implementation: jsdom@24.0.0

Additional context

Here is the link to the repository
https://github.com/KevinEonix/DevExpressVitestError

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