test(document): enable and fix skipped pathsToSkip test#16011
Merged
vkarpov15 merged 2 commits intoAutomattic:masterfrom Feb 6, 2026
Merged
test(document): enable and fix skipped pathsToSkip test#16011vkarpov15 merged 2 commits intoAutomattic:masterfrom
vkarpov15 merged 2 commits intoAutomattic:masterfrom
Conversation
AbdelrahmanHafez
requested changes
Feb 5, 2026
Collaborator
AbdelrahmanHafez
left a comment
There was a problem hiding this comment.
The test file has so many unrelated formatting changes that make it really difficult to review, can you please revert these changes?
Author
|
apologies for the unrelated formatting changes in the previous commit, i have fixed that formatting changes now it will be much easier to review it |
3d2d67b to
83848ea
Compare
AbdelrahmanHafez
approved these changes
Feb 5, 2026
Collaborator
AbdelrahmanHafez
left a comment
There was a problem hiding this comment.
LGTM, thanks! 👍
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.
Summary
This PR enables a test case for
Model.validate()with thepathsToSkipoption that was previously skipped with a "TODO" comment.The test was originally skipped because the implementation was incorrect; it attempted to await
User.validate()without catching the rejected Promise that occurs during a validation error. This caused the test to crash instead of asserting the error contents.I have updated the test to correctly handle the Promise rejection and assert that the correct validation errors are returned, verifying that the
pathsToSkipfeature works as intended forModel.validate().Examples
Before (Skipped):
After (Enabled & Fixed):