Skip to content

InputEvent is not supported Error on previously passing tests #116

@davidlukerice

Description

@davidlukerice
  • react-testing-library version: 5.2.0
  • dom-testing-library version: 3.8.3
  • react version:16.5.2
  • node version: v8.12.0
  • npm version: 6.4.1

Relevant code or config:

Running via create-react-app v1 through react-testing-library.

What you did:

Ran tests in CI. Once I saw they were broken, cleared my local node_modules and started having the same issues

What happened:

1/5th of our tests started breaking in our CI about an hour ago when 3.8.3 came out with the following errors:

InputEvent is not supported
      at Function.fireEvent.(anonymous function) [as change] (node_modules/dom-testing-library/dist/events.js:344:13)
      at Object.it ([redacted]/index.test.js:42:36)
          at <anonymous>

The index.test.js line the error points to is

const firstNameField = await waitForElement(() =>
  getByLabelText('First Name')
);

fireEvent.change(firstNameField, { // line 42
  target: { value: 'testFirstName' },
});

Reproduction:

Run previously working tests.

Problem description:

This was just a bugfix release so shouldn't cause this many issues, right?

Suggested solution:

Still digging into what changed and is causing the issue.

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