Skip to content

Release testHook and act support #280

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

Merged
merged 4 commits into from
Feb 6, 2019
Merged

Release testHook and act support #280

merged 4 commits into from
Feb 6, 2019

Conversation

kentcdodds
Copy link
Member

What: Release testHook and act support

Why: Because React 16.8.0 was released!! Hooray!

How: See the individual PRs associated to this next branch for more info.

Checklist:

  • Documentation (will happen on the docs site)
  • Tests
  • Ready to be merged
  • Added myself to contributors table N/A

@codecov
Copy link

codecov bot commented Feb 6, 2019

Codecov Report

Merging #280 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #280   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      2    +1     
  Lines          27     41   +14     
  Branches        5      6    +1     
=====================================
+ Hits           27     41   +14
Impacted Files Coverage Δ
src/act-compat.js 100% <100%> (ø)
src/index.js 100% <100%> (ø) ⬆️

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 14b567f...d1edba8. Read the comment docs.

Sorry @donavon, this is the best we can do I think :-(
@kentcdodds kentcdodds merged commit f1b4d4c into master Feb 6, 2019
@kentcdodds kentcdodds deleted the next branch February 6, 2019 15:58
@kentcdodds
Copy link
Member Author

🎉 This PR is included in version 5.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

const act = reactAct || (cb => cb())

function rtlAct(...args) {
return act(...args)
Copy link
Contributor

Choose a reason for hiding this comment

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

you can actually polyfill it for older versions of react

function act(fn){
  ReactDOM.unstable_batchedUpdates(fn);
  ReactDOM.render(<div/>, document.createElement('div'));
}

you won't get the warnings, but something's better than nothing I suppose.

lucbpz pushed a commit to lucbpz/react-testing-library that referenced this pull request Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants