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

Theme JSON Tests: Refactor base styles to a static variable #58975

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

scruffian
Copy link
Contributor

What?

Moves the bases styles string to a static variable.

Why?

Just keeps the code cleaner.

How?

Puts the string into a static variable.

Testing Instructions

Run the tests: npm run test:unit:php:base -- --filter WP_Theme_JSON_Gutenberg_Test

@scruffian scruffian requested a review from ajlende February 13, 2024 15:42
@scruffian scruffian added the [Type] Code Quality Issues or PRs that relate to code quality label Feb 13, 2024
@scruffian scruffian self-assigned this Feb 13, 2024
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ phpunit/class-wp-theme-json-test.php

Copy link

Flaky tests detected in 5229091.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7889030292
📝 Reported issues:

@carolinan carolinan changed the title Theme JSON: Refactor base styles to a static variable Theme JSON Tests: Refactor base styles to a static variable Feb 22, 2024
@MaggieCabrera MaggieCabrera added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. and removed [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Mar 1, 2024
Copy link
Contributor

@MaggieCabrera MaggieCabrera left a comment

Choose a reason for hiding this comment

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

So much cleaner now, thank you!

Copy link

github-actions bot commented Mar 1, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: scruffian <scruffian@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@scruffian scruffian merged commit 77896ed into trunk Mar 1, 2024
62 of 64 checks passed
@scruffian scruffian deleted the refactor/theme-json-tests branch March 1, 2024 13:57
@github-actions github-actions bot added this to the Gutenberg 17.9 milestone Mar 1, 2024
@andrewserong
Copy link
Contributor

+1 this makes it so much easier to read!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
Development

Successfully merging this pull request may close these issues.

3 participants