File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ Describe "Convert-JsoncToJson 函数测试" {
7777 It " 成功转换JSONC到JSON" {
7878 $result = Convert-JsoncToJson - Path $testJsoncPath
7979 $result | Should -Not - BeNullOrEmpty
80- $result | ConvertFrom-Json | % { $_.name } | Should - Be " test"
80+ $result | ConvertFrom-Json | ForEach-Object { $_.name } | Should - Be " test"
8181 }
8282
8383 It " 成功移除单行注释" {
@@ -105,9 +105,9 @@ Describe "Convert-JsoncToJson 函数测试" {
105105 }
106106
107107 It " 正确处理包含$schema的JSONC文件 " {
108- $result = Convert-JsoncToJson - Path $testJsoncWithSchemaPath - Debug
108+ $result = Convert-JsoncToJson - Path $testJsoncWithSchemaPath
109109 $result | Should -Not - BeNullOrEmpty
110- $result | ConvertFrom-Json | % { $_.name } | Should - Be " schema_test"
110+ $result | ConvertFrom-Json | ForEach-Object { $_.name } | Should - Be " schema_test"
111111 $result -match ' \$schema' | Should - Be $false
112112 }
113113
You can’t perform that action at this time.
0 commit comments