Skip to content

_userEvent.default.setup is not a function #839

@Tommoore96

Description

@Tommoore96
  • @testing-library/user-event version: ^14.0.0-beta
  • DOM Environment: 8.11.1
  • Node version: 14.17.4

Relevant code or config

const user = userEvent.setup()

What you did:
Tests worked perfectly before updating, I just wanted the latest version for the pointer method.

Followed the latest documentation and tried multiple versions 14 and above.

Imported like so:

import userEvent from '@testing-library/user-event';

and initialised like so:

const user = userEvent.setup()

What happened:
Tests failed and receive following error:
TypeError: _userEvent.default.setup is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions