PowerShell/test/powershell/Modules
Kitt Holland d69193e49c Prettier formatting for ConvertTo-Json output. #2736 (#2787)
* Prettier formatting for ConvertTo-Json output. #2736

This change standardizes JSON output to example given, as well as
codemaid and online lint tools.

Sample object used for testing:

@{
foo = @{
first = 'a'
second = 'bbbbbbbb'
}
barbarbarbar = @{
first = 'a'
second = 'bbbbbbbb'
NestedArray = @(
'Test3'
'Test4'
'Test5'
3
4
)
NestedObject = @{
MoreObject = 'AnotherObject'
TestBool = $true
}
}
array = @(
'Thing1'
'Thing2'
)
dan = 15
} | ConvertTo-Json

* Updated CoreCLR implementation to use NewtonSoft Indented Formatting

I did not change the FullCLR behavior, I was not sure if you meant to
revert my changes or to leave it as is in the current pull request.

* Added tests that validate pretty Json output.

Not sure if there is a better thought on how to implement these. The
first two fail against current master, but succeed once this PR is
applied. Third test is successful prior and post this PR.

* Moved tests and removed extraneous file.

Moved pretty/compressed json tests from standalone file into the
existing ConvertTo-Json test file.

* Updated tests for cross-platform support
2017-02-24 14:40:11 -08:00
..
CimCmdlets Added tests to close code coverage in CIM area (#2528) 2016-11-17 11:46:07 -08:00
Microsoft.PowerShell.Archive Small typo in archive cmdlets tests (#3121) 2017-02-10 13:39:34 -08:00
Microsoft.PowerShell.Core Provide additional tests for the *-Job cmdlets (#3110) 2017-02-22 08:46:27 -08:00
Microsoft.PowerShell.Diagnostics Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Microsoft.Powershell.Host Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Microsoft.PowerShell.LocalAccounts Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Microsoft.PowerShell.Management Get-ComputerInfo - fix typo in property name (#3167) 2017-02-17 13:10:51 -08:00
Microsoft.PowerShell.Security Add ShouldProcess to New-FileCatalog and Test-FileCatalog (#3074) 2017-02-17 16:32:58 -08:00
Microsoft.PowerShell.Utility Prettier formatting for ConvertTo-Json output. #2736 (#2787) 2017-02-24 14:40:11 -08:00
PackageManagement Jameswtruher/travisdaily2 (#2842) 2016-12-06 13:58:57 -08:00
PowerShellGet Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
PSDesiredStateConfiguration Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
PSReadLine Add regression tests for custom key bindings 2016-07-28 22:41:04 -07:00
map.json fix two more file copy targets 2016-08-02 12:05:24 -07:00