-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix misleading test description for filesize field 0 bytes behavior #74023
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
Fix misleading test description for filesize field 0 bytes behavior #74023
Conversation
…k behavior for 0 bytes Co-authored-by: ramonjd <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @Copilot. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
…85f-670a-4eb5-ad78-f9b43ccfe596
|
Flaky tests detected in be44b67. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20254480079
|
|
Wow, looks like Copilot is trying to improve its merged PRs stats 😆 |
…74023) Co-authored-by: ramonjd <[email protected]>
The test for 0 bytes filesize claimed the empty string was returned "because isVisible will hide it", but the actual reason is the truthy check in
getValue:Since 0 is falsy in JavaScript,
getValuereturns''beforeformatFileSizeis ever called. TheformatFileSizefunction would actually return"0 B"if it received 0 (line 47-49), but it never reaches that code path.Changes
formatFileSizewould return "0 B" for 0, but is never called✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.