Add comprehensive PSCustomObject tests for ConvertTo-Json#26743
Add comprehensive PSCustomObject tests for ConvertTo-Json#26743daxian-dbw merged 2 commits intoPowerShell:masterfrom
Conversation
05f4e31 to
852aca0
Compare
iSazonov
left a comment
There was a problem hiding this comment.
@yotsuda Please resolve merge conflicts.
Not all tests follow "via Pipeline and InputObject" pattern.
I'd move tests for PowerShell classes in another PR since we need more tests. I don't see tests with array and dictionary fields at least.
852aca0 to
a781f41
Compare
|
Thank you for the review, @iSazonov! I've addressed all your feedback:
All 22 PSCustomObject tests pass. (a781f41) |
There was a problem hiding this comment.
Pull request overview
Adds a new “Phase 3” test block to expand ConvertTo-Json coverage for PSCustomObject serialization scenarios in the PowerShell Utility module tests.
Changes:
- Add comprehensive
PSCustomObjectserialization tests (basic, type coverage, nesting/depth, ETS properties). - Add array-focused
PSCustomObjecttests including-AsArraybehavior.
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Show resolved
Hide resolved
test/powershell/Modules/Microsoft.PowerShell.Utility/ConvertTo-Json.Tests.ps1
Show resolved
Hide resolved
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
PR Summary
Add comprehensive PSCustomObject tests for
ConvertTo-Json(Phase 3).PR Context
This is a follow-up to #26742. Per @iSazonov's suggestion in #26639, comprehensive tests are being submitted as separate PRs for each phase.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerTests Added
The following PSCustomObject tests are added to
ConvertTo-Json.Tests.ps1:Total: 21 new tests