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(debug): allow debugging an array of containers #495

Conversation

danieljcafonso
Copy link
Contributor

What:
Adds the ability to log an array of containers.

Why:
Right now, if you try to debug the output of a queryAll or getAll, you will receive an error. This will allow everyone to see the output of each container inside of the output of that query.

How:
Checks if the received container is an array, if so, logs each element of it.

Checklist:

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

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.

Cool 💯

src/pure.js Outdated Show resolved Hide resolved
alexkrolick
alexkrolick previously approved these changes Oct 3, 2019
@alexkrolick alexkrolick dismissed their stale review October 3, 2019 19:09

debug should return only undefined

@danieljcafonso danieljcafonso force-pushed the pr/allow-receiving-elements-array-on-debug branch from 385bad4 to 6b9c2dc Compare October 3, 2019 19:13
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.

Awesome. Thanks! If you'd like to update the TypeScript definitions too that would be cool 👍

@kentcdodds kentcdodds merged commit f2805d4 into testing-library:master Oct 3, 2019
@kentcdodds
Copy link
Member

@all-contributors please add @danieljcafonso for code and tests

@allcontributors
Copy link
Contributor

@kentcdodds

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

@kentcdodds
Copy link
Member

🎉 This PR is included in version 9.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

3 participants