Skip to content

.click() not working when injectGlobals: false and fake timers enabled #1173

Closed as duplicate of#1115
@krutoo

Description

@krutoo

Reproduction example

https://github.com/krutoo/testing-library-user-event-with-fake-timers

Prerequisites

  1. clone repo
  2. npm install
  3. npm run test

Expected behavior

Tests should be done

Actual behavior

Test fails by timeout 5000ms

User-event version

14.5.1

Environment

Testing Library framework: @testing-library/[email protected]

JS framework: [email protected]

Test environment: [email protected]

DOM implementation: [email protected]

Additional context

In jest config I use injectGlobals: false and may be its the reason

I also use userEvent.setup({ advanceTimers: jest.advanceTimersByTime }) and its not solves issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions