Feature/tests#451
Closed
scottblackburn wants to merge 6 commits intoAutomattic:developfrom
Closed
Conversation
# Conflicts: # assets/app.css # assets/app.js # assets/app.js.map # package.json # src/react/utils/utils.js # yarn.lock
Contributor
|
Thanks @scottblackburn ill take a look at this! 😄 |
GaryJones
added a commit
that referenced
this pull request
Dec 2, 2025
Introduces comprehensive test coverage for the React-based liveblog interface, addressing a long-standing gap in the codebase's testing infrastructure. These tests validate the core state management logic that powers the real-time entry updates, pagination, and event handling. The test suite covers six reducers (api, config, events, pagination, polling, user) and three utility modules (timeUtils, updateUtilities, utils), with accompanying mock data fixtures to simulate API responses and entry updates. All 32 tests pass successfully and are now executed via a GitHub Actions workflow on pull requests. Whilst the tests were originally authored by @scottblackburn in 2018 (PR #451), they remained unmerged until now. This commit adopts that work with minimal modifications to integrate with the current codebase structure. Co-authored-by: Scott Blackburn <scott@scottblackburn.com>
2 tasks
Contributor
|
Thank you for this contribution @scottblackburn! 🎉 After 7 years, we're finally adopting your JavaScript unit tests. The reducer and utility tests you wrote have been extracted and integrated into the current codebase in #741. What was adopted:
What was not adopted:
The tests still pass without modification - a testament to the stable API design of the reducers and utilities. We've added a CI workflow to run these tests on every PR. Closing this in favour of #741, which credits you as co-author. Thanks again for the valuable contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As tests have been mentioned in #449, we thought it would be worth sharing these tests that were added for 1.7 and could be a good base for extending in the future.