Skip to content

ReactTestUtils.Simulate.click does not work with jsdom #1185

@yanns

Description

@yanns

When testing a react application on Nodejs with mocha and jsdom, ReactTestUtils.Simulate.click does not affect the component.

Sample app to reproduce the problem:
https://github.com/yanns/react-unit-test/tree/pb-with-jsdom

The test:
https://github.com/yanns/react-unit-test/blob/pb-with-jsdom/src/test/mocha/LabelTest.js

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