Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
@wordpress/data: Handle more return type values from a mapSelect argument on useSelect #16669
See #16612 for original report. The
I added some unit tests that demonstrated (when run against original
This pull adds a new utility function
How has this been tested?
Types of changes
This is a non-breaking change that simply fixes a problem with expectations (especially considering the current documentation) around what a
Tests are not only for validating logic and guarding regressions. They serve as living documentation of our code for folks who are adventuring into parts of the codebase that are unknown to them. I don't think they should have different quality standards than our other code.
That said, the test is looking a lot better after the initial iterations. There are still a few things I would change like the unnecessary
Thanks for taking care of this PR
I 100% agree. My comment wasn't a complaint. It was more of an observation of the thoroughness of your review (hence the smiley). I probably could've worded better though.
I didn't assume it was, I try to not make assumptions like that, because so much tone and context is lost through text. But I figured it wouldn't hurt to make my approach as transparent as possible