Skip to content

Conversation

@marcosvega91
Copy link
Member

@marcosvega91 marcosvega91 commented Oct 5, 2020

fix #775

What: fix typescript type

Why: It was not correct, because you can create custom Event using createEvent function

How:

Checklist:

  • Documentation added to the
    docs site
  • Tests
  • Typescript definitions updated
  • Ready to be merged
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 5, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 670a364:

Sandbox Source
kentcdodds/react-testing-library-examples Configuration
@codecov
Copy link

codecov bot commented Oct 5, 2020

Codecov Report

Merging #776 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #776 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 25 25 Lines 702 702 Branches 183 183 ========================================= Hits 702 702 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01e243b...670a364. Read the comment docs.

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test in types/__tests__/type-tests.ts would be nice.

@marcosvega91
Copy link
Member Author

I have added the test. I have changed the type of the eventName to string

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kentcdodds kentcdodds merged commit 9b08b70 into testing-library:master Oct 5, 2020
@testing-library-bot
Copy link

🎉 This PR is included in version 7.24.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@eschaefer
Copy link

@marcosvega91 this seems to have broken events like this in my tests:

fireEvent( document, new KeyboardEvent('keydown', { key: 'Backspace', code: 'Backspace' }) ); 

Looking into the cause, but until I know, I need to downgrade to 7.24.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 participants