Bump NJsonSchema from 10.4.3 to 10.6.2#27
Closed
dependabot[bot] wants to merge 1 commit into
Closed
Conversation
Bumps NJsonSchema from 10.4.3 to 10.6.2. --- updated-dependencies: - dependency-name: NJsonSchema dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Author
|
The following labels could not be found: |
Author
|
Superseded by #28. |
nohwnd
added a commit
that referenced
this pull request
Jun 11, 2026
…ate) and #27 (file-scope vars invisible in runtime hooks) Anti-pattern #26 (PSDefaultParameterValues["it:skip"] set inside BeforeAll runs AFTER It blocks are wired up at discovery, so skip doesn't take effect): - PSDiagnostics.Tests.ps1: Describe -Skip:(-not $IsWindows) - TestWSMan.Tests.ps1: Describe -Skip:(-not $IsWindows) - CredSSP.Tests.ps1: Describe -Skip:(-not $IsWindows); move $NotEnglish detection to BeforeDiscovery so It -Skip can see it. Anti-pattern #27 (file-scope vars + functions invisible to It runtime scope): - Pester.AutomountedDrives.Tests.ps1: move $SubstNotFound / $VHDToolsNotFound detection from BeforeAll to BeforeDiscovery so It -Skip sees them; Describe -Skip:(-not $IsWindows). - Get-Counter.Tests.ps1: ValidateParameters wrapper now passes $testCase + $cmdletName via -TestCases; Describes get BeforeAll that dot-sources helpers and re-builds $counterPaths so inline It bodies (Get-Counter CounterSet tests) can resolve them at runtime. - Export-Counter.Tests.ps1: RunTest wrapper now passes $testCase + $cmdletName + $rootFilename + $counterNames via -TestCases; uses $TestDrive directly instead of $script:outputDirectory; top-level BeforeAll re-defines CheckExportResults so Script={ CheckExportResults } closures resolve at runtime. - CounterTestHelperFunctions.ps1: guard Add-Type with -not ('TestCounterHelper' -as [type]) so dot-sourcing into BeforeAll doesn't re-register the type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd
added a commit
that referenced
this pull request
Jun 11, 2026
Fixed with WSL Ubuntu 24.04 local repro (Pester 5.7.1 + pwsh 7.6.2), keeping CI loops minimized. Anti-pattern #26 (skip-in-BeforeAll too late): - Unblock-File.Tests.ps1: Context 'Windows and macOS' now uses -Skip:$IsLinux at discovery rather than mutating $PSDefaultParameterValues['it:skip'] in BeforeAll (which runs after test wiring). Drops the buggy AfterAll that nulled $global:PSDefaultParameterValues via a BeforeAll-local variable. Anti-pattern #27 (file/BeforeAll vars invisible at discovery / runtime): - Format-Table.Tests.ps1: $noConsole moved to BeforeDiscovery so -Skip:$noConsole on the two -RepeatHeader Its applies at discovery. - Set-Content.Tests.ps1: $skipRegistry duplicated into BeforeDiscovery so -Skip:$skipRegistry sees it. - DefaultCommands.Tests.ps1: rebind $script:commandList, $script:commandHashTableList, $script:aliasFullList in BeforeAll; file-scope $script: assignments don't propagate into runtime hooks. - UsingAssembly.Tests.ps1: promote $guid to $script:UsingAssemblyTestGuid at file scope; rebind inside BeforeDiscovery/BeforeAll/AfterAll/Context BeforeAll/It so the same GUID is visible across discovery + runtime hooks. Add Push-Location inside the relative-path It so cwd is reliably $PSScriptRoot. - Import-Module.Tests.ps1: trailing-directory-separator test cases now point at a stable temp dir created during BeforeDiscovery so the modulePath in -TestCases actually exists at runtime. Wildcard ExpectedMessage on Should -Throw (Pester 5 doesn't substring-match): - Out-File.Tests.ps1: 'already exists.' -> '*already exists.*' - Get-Content.Tests.ps1: 'IContentCmdletProvider interface is not implemented' -> wrapped with *...* Function visibility in It runtime: - TimeZone.Tests.ps1: move Assert-ListsSame helper into the Describe's BeforeAll so it is in scope when Its invoke it. New anti-pattern #29 (using namespace doesn't propagate into It scriptblocks): - UsingNamespace.Tests.ps1: mark the two affected Its (string-to-Type conversion via -as [Type] and ambiguous [ThreadState]) as -Pending with comments. Type literals like [Thread] still resolve because they are baked at parse time. - Generics.Tests.ps1: rewrite the New-Object string-name call in 'dictionary[dictionary[list[int],string], stack[double]]' to use fully qualified type names. Test-data collision: - BugFix.Tests.ps1: -Force on the 'Native CLI argument completion' BeforeAll directory/file creation so it doesn't fail when a prior It in the same Describe already created the same TestDrive path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd
added a commit
that referenced
this pull request
Jun 11, 2026
Targets the smaller post-R19 failures. 1. Select-Xml.Tests.ps1 - testParameterMap fix. BeforeDiscovery TestCases had only testName; old BeforeAll appended testParameter to a wrong local $testcases variable, then built the map, so all 6 base cases mapped to $null and Select-Xml @null failed. Now BeforeAll populates $testParameterMap with all 6 base cases from runtime-resolved paths; optional 2 network cases conditional on !$IsCoreCLR. 2. CmsMessage2.Tests.ps1 - Skip on non-Windows. Protect-CmsMessage / Unprotect-CmsMessage are Windows-only. The file-scope "using namespace" + "function New-CmsRecipient" are also invisible inside Pester 5 BeforeAll (anti-pattern #23/#29). Skipping the whole Describe on non-Windows is the correct fix; also moved New-CmsRecipient inside the BeforeAll and fully qualified the System.Security.Cryptography.X509Certificates types so the Windows path still works. 3. Add-Type.Tests.ps1 - TestCases-at-discovery fix (anti-pattern #27). "Can compile CSharp files" used -TestCases @{ file1 = $CSharpFile1 ; ... } referencing BeforeAll-assigned vars. TestCases are evaluated at DISCOVERY time, so these resolve to $null leading to "Cannot bind argument to parameter Path because it is null." Moved the runtime values into the It body. 4. DefaultCommands.Tests.ps1 - global bridge for $commandString. R17 rebound $script: vars inside BeforeAll but read from file-scope $commandString, which is invisible inside Pester 5 BeforeAll. Result was $expectedAliases / $expectedCmdletNames still null. Now stash the CSV string into $global:DefaultCommandsTestData_CommandString at file scope (global IS visible in BeforeAll) and parse from there inside BeforeAll. 5. Rename-Item.Tests.ps1 - bracket dir cleanup. The "[test-dir]" subdirectory created in BeforeAll wasn't being created at all on CI (Push-Location -LiteralPath then failed, 2 tests failed). Switched to New-Item -Path $TestDrive -Name '[test-dir]' so the literal bracket name actually creates. Added AfterAll that uses -LiteralPath to remove bracket-named items before Pester's wildcard-based Clear-TestDrive trips over them. WSL CI-tag validation: 248 P / 1 F (the 1 fail is .NET-SDK-version specific in WSL, not in CI failure list). R19 baseline: Linux Unelev CI 90 F, macOS Unelev CI 82 F. Expected R20 wins: ~18 (Select-Xml) + ~4 (CmsMessage2) + ~1 (Add-Type) + ~8 (DefaultCommands) + ~4 (Rename-Item) per OS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd
added a commit
that referenced
this pull request
Jun 29, 2026
…ate) and #27 (file-scope vars invisible in runtime hooks) Anti-pattern #26 (PSDefaultParameterValues["it:skip"] set inside BeforeAll runs AFTER It blocks are wired up at discovery, so skip doesn't take effect): - PSDiagnostics.Tests.ps1: Describe -Skip:(-not $IsWindows) - TestWSMan.Tests.ps1: Describe -Skip:(-not $IsWindows) - CredSSP.Tests.ps1: Describe -Skip:(-not $IsWindows); move $NotEnglish detection to BeforeDiscovery so It -Skip can see it. Anti-pattern #27 (file-scope vars + functions invisible to It runtime scope): - Pester.AutomountedDrives.Tests.ps1: move $SubstNotFound / $VHDToolsNotFound detection from BeforeAll to BeforeDiscovery so It -Skip sees them; Describe -Skip:(-not $IsWindows). - Get-Counter.Tests.ps1: ValidateParameters wrapper now passes $testCase + $cmdletName via -TestCases; Describes get BeforeAll that dot-sources helpers and re-builds $counterPaths so inline It bodies (Get-Counter CounterSet tests) can resolve them at runtime. - Export-Counter.Tests.ps1: RunTest wrapper now passes $testCase + $cmdletName + $rootFilename + $counterNames via -TestCases; uses $TestDrive directly instead of $script:outputDirectory; top-level BeforeAll re-defines CheckExportResults so Script={ CheckExportResults } closures resolve at runtime. - CounterTestHelperFunctions.ps1: guard Add-Type with -not ('TestCounterHelper' -as [type]) so dot-sourcing into BeforeAll doesn't re-register the type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd
added a commit
that referenced
this pull request
Jun 29, 2026
Fixed with WSL Ubuntu 24.04 local repro (Pester 5.7.1 + pwsh 7.6.2), keeping CI loops minimized. Anti-pattern #26 (skip-in-BeforeAll too late): - Unblock-File.Tests.ps1: Context 'Windows and macOS' now uses -Skip:$IsLinux at discovery rather than mutating $PSDefaultParameterValues['it:skip'] in BeforeAll (which runs after test wiring). Drops the buggy AfterAll that nulled $global:PSDefaultParameterValues via a BeforeAll-local variable. Anti-pattern #27 (file/BeforeAll vars invisible at discovery / runtime): - Format-Table.Tests.ps1: $noConsole moved to BeforeDiscovery so -Skip:$noConsole on the two -RepeatHeader Its applies at discovery. - Set-Content.Tests.ps1: $skipRegistry duplicated into BeforeDiscovery so -Skip:$skipRegistry sees it. - DefaultCommands.Tests.ps1: rebind $script:commandList, $script:commandHashTableList, $script:aliasFullList in BeforeAll; file-scope $script: assignments don't propagate into runtime hooks. - UsingAssembly.Tests.ps1: promote $guid to $script:UsingAssemblyTestGuid at file scope; rebind inside BeforeDiscovery/BeforeAll/AfterAll/Context BeforeAll/It so the same GUID is visible across discovery + runtime hooks. Add Push-Location inside the relative-path It so cwd is reliably $PSScriptRoot. - Import-Module.Tests.ps1: trailing-directory-separator test cases now point at a stable temp dir created during BeforeDiscovery so the modulePath in -TestCases actually exists at runtime. Wildcard ExpectedMessage on Should -Throw (Pester 5 doesn't substring-match): - Out-File.Tests.ps1: 'already exists.' -> '*already exists.*' - Get-Content.Tests.ps1: 'IContentCmdletProvider interface is not implemented' -> wrapped with *...* Function visibility in It runtime: - TimeZone.Tests.ps1: move Assert-ListsSame helper into the Describe's BeforeAll so it is in scope when Its invoke it. New anti-pattern #29 (using namespace doesn't propagate into It scriptblocks): - UsingNamespace.Tests.ps1: mark the two affected Its (string-to-Type conversion via -as [Type] and ambiguous [ThreadState]) as -Pending with comments. Type literals like [Thread] still resolve because they are baked at parse time. - Generics.Tests.ps1: rewrite the New-Object string-name call in 'dictionary[dictionary[list[int],string], stack[double]]' to use fully qualified type names. Test-data collision: - BugFix.Tests.ps1: -Force on the 'Native CLI argument completion' BeforeAll directory/file creation so it doesn't fail when a prior It in the same Describe already created the same TestDrive path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd
added a commit
that referenced
this pull request
Jun 29, 2026
Targets the smaller post-R19 failures. 1. Select-Xml.Tests.ps1 - testParameterMap fix. BeforeDiscovery TestCases had only testName; old BeforeAll appended testParameter to a wrong local $testcases variable, then built the map, so all 6 base cases mapped to $null and Select-Xml @null failed. Now BeforeAll populates $testParameterMap with all 6 base cases from runtime-resolved paths; optional 2 network cases conditional on !$IsCoreCLR. 2. CmsMessage2.Tests.ps1 - Skip on non-Windows. Protect-CmsMessage / Unprotect-CmsMessage are Windows-only. The file-scope "using namespace" + "function New-CmsRecipient" are also invisible inside Pester 5 BeforeAll (anti-pattern #23/#29). Skipping the whole Describe on non-Windows is the correct fix; also moved New-CmsRecipient inside the BeforeAll and fully qualified the System.Security.Cryptography.X509Certificates types so the Windows path still works. 3. Add-Type.Tests.ps1 - TestCases-at-discovery fix (anti-pattern #27). "Can compile CSharp files" used -TestCases @{ file1 = $CSharpFile1 ; ... } referencing BeforeAll-assigned vars. TestCases are evaluated at DISCOVERY time, so these resolve to $null leading to "Cannot bind argument to parameter Path because it is null." Moved the runtime values into the It body. 4. DefaultCommands.Tests.ps1 - global bridge for $commandString. R17 rebound $script: vars inside BeforeAll but read from file-scope $commandString, which is invisible inside Pester 5 BeforeAll. Result was $expectedAliases / $expectedCmdletNames still null. Now stash the CSV string into $global:DefaultCommandsTestData_CommandString at file scope (global IS visible in BeforeAll) and parse from there inside BeforeAll. 5. Rename-Item.Tests.ps1 - bracket dir cleanup. The "[test-dir]" subdirectory created in BeforeAll wasn't being created at all on CI (Push-Location -LiteralPath then failed, 2 tests failed). Switched to New-Item -Path $TestDrive -Name '[test-dir]' so the literal bracket name actually creates. Added AfterAll that uses -LiteralPath to remove bracket-named items before Pester's wildcard-based Clear-TestDrive trips over them. WSL CI-tag validation: 248 P / 1 F (the 1 fail is .NET-SDK-version specific in WSL, not in CI failure list). R19 baseline: Linux Unelev CI 90 F, macOS Unelev CI 82 F. Expected R20 wins: ~18 (Select-Xml) + ~4 (CmsMessage2) + ~1 (Add-Type) + ~8 (DefaultCommands) + ~4 (Rename-Item) per OS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Bumps NJsonSchema from 10.4.3 to 10.6.2.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)