Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(fireEvent): Add resize event #990

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Jul 1, 2021

What:

Closes #179 (was closed without adding resize event)

Why:

Enables automatic wrapping of resize events with act in /react via fireEvent.resize.

How:

Add the appropriate config. There's no verification for the event target since we never check if the event target is valid.

Checklist:

  • [ ] Documentation added to the
    docs site (Documentation points to source)
  • Tests
  • Typescript definitions updated
  • Ready to be merged

@eps1lon eps1lon added the enhancement New feature or request label Jul 1, 2021
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 1, 2021

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 7443b1b:

Sandbox Source
react-testing-library-examples Configuration

@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #990 (7443b1b) into main (84ebc51) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #990   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines          914       914           
  Branches       281       283    +2     
=========================================
  Hits           914       914           
Flag Coverage Δ
node-12 100.00% <ø> (ø)
node-14 100.00% <ø> (ø)
node-16 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/event-map.js 100.00% <ø> (ø)

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 84ebc51...7443b1b. Read the comment docs.

@eps1lon eps1lon marked this pull request as ready for review July 1, 2021 13:35
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.

Simple enough. Thanks!

@kentcdodds kentcdodds merged commit 75197fe into testing-library:main Jul 1, 2021
@github-actions
Copy link

github-actions bot commented Jul 1, 2021

🎉 This PR is included in version 8.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@eps1lon eps1lon deleted the feat/resize-event branch July 1, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

focusIn, focusOut, and resize events
2 participants