Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Fix for console.error argument not being a string #97

Merged
merged 1 commit into from
Dec 13, 2019

Conversation

AEgan
Copy link
Contributor

@AEgan AEgan commented Dec 12, 2019

prevents asyncAct throwing an error if the item being logged isn't a string.

Coped mostly from testing-library/react-testing-library#476

What:

Following a similar PR made in react-testing-library, this fixes an issue where act-compat assumed console.error was being called with a string.

Why:

Current implementation assumes console.error was always called with a string even though it could be called with other types.

How:
Wrapped execution of code in a type check if statement to ensure operations are done only on string types.

Checklist:

  • Documentation added to the
    docs site
  • Typescript definitions updated
  • Tests
  • Ready to be merged

prevents asyncAct throwing an error if the item being logged isn't a string.

Coped mostly from testing-library/react-testing-library#476
@codecov
Copy link

codecov bot commented Dec 12, 2019

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #97   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          20     20           
  Lines         268    268           
  Branches       67     67           
=====================================
  Hits          268    268

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 a1f9f85...2902f8e. Read the comment docs.

Copy link
Collaborator

@bcarroll22 bcarroll22 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@bcarroll22 bcarroll22 merged commit 99c3f6b into testing-library:master Dec 13, 2019
@bcarroll22
Copy link
Collaborator

@allcontributors please add @AEgan for code

@allcontributors
Copy link
Contributor

@bcarroll22

I've put up a pull request to add @AEgan! 🎉

@AEgan
Copy link
Contributor Author

AEgan commented Mar 23, 2020

@bcarroll22 when can we expect a new release that includes this PR?

@bcarroll22
Copy link
Collaborator

🎉 This PR is included in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants