-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite a test case due to WordPressComRestApiError not longer confor…
…m to Error
- Loading branch information
1 parent
d97d4e2
commit bedee4d
Showing
1 changed file
with
2 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
bedee4d
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.
Love to see this test changing within the scope of the PR itself.
I'm biased, but to me it shows the usefulness of unit tests as a development-guiding tool.
bedee4d
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.
Haha, I was kind of on the opposite side: unit tests should not be updated during a refactor, except syntax changes.
This is pretty philosophical, but here is my thinking. Given the source code (
WordPressComRestApi
in this case) has good test coverage, when there are large refactor on the source code, but minimal (or none) changes on the related unit tests, that means the refactor is in a good state, because it didn't break any existing unit tests. That's why I created some small PRs to add unit tests before this large refactor, to increase the test coverage.