-
Notifications
You must be signed in to change notification settings - Fork 39
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
Readme Check: Compare Tested up to
value with latest stable version
#483
Conversation
c784d04
to
d6ee074
Compare
Refinement in Unit tests: We could remove over-scoping of test methods so that we would not have to update tests in every readme related PR. Example:
When we are testing ERROR for invalid plugin name, we should not be caring how many warnings are there. We should focus on whether our ERROR is there or not. Related: https://github.com/WordPress/plugin-check/actions/runs/9743511198/job/26887103212#step:7:270 |
Agreed, I don't know why all these tests are doing that. |
I've made some changes: Detect major version (for example 6.5) and prevent some readme file without version added. |
Let's undo the changes to We should rely on https://api.wordpress.org/core/version-check/1.7/ providing a correct value for (Note: for some reason it says 6.4 right now but I already reported this bug). |
I refactored the test
Here:
Errors array:
Is this approach good? |
You can use |
In the future we could think about custom PHPUnit assertions to make our lives easier. |
I tried this approach also. https://github.com/ernilambar/plugin-check/pull/10/files |
@swissspidy For tests like |
You mean specifically for Given that this PR updates the check and the If you mean specifically for the |
Not specific to What if have an fixed array of codes which we check against. Though, in that case |
There's definitely room for improvement in how tests are structured and how we check for error codes. And tests like "runs without errors" are a bit too broad. Better to check for good and bad cases for each individual sub-check. But let's discuss that in a new issue :-) |
5f22a30
to
bb75d95
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What happen with the version? We keep regex then? |
Yes. Turns out I was wrong and we have to keep using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see everything is OK.
Fixes #481