From ea23ad3efb382a0d472634e042dc281d9b0fbe19 Mon Sep 17 00:00:00 2001 From: nsingh Date: Tue, 13 Oct 2026 17:43:28 +0530 Subject: [PATCH 1/2] fix: syntax change as per pester v5 --- .version/test/version.tests.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.version/test/version.tests.ps1 b/.version/test/version.tests.ps1 index b49c8c6..798c802 100644 --- a/.version/test/version.tests.ps1 +++ b/.version/test/version.tests.ps1 @@ -44,8 +44,8 @@ Describe 'version.ps1' { } } - Assert-MockCalled -CommandName 'Get-Content' -Exactly 4 - Assert-MockCalled -CommandName 'Set-Content' -Exactly 4 + Should -Invoke -CommandName 'Get-Content' -Exactly 4 + Should -Invoke -CommandName 'Set-Content' -Exactly 4 } It 'matched version is a no-op' { @@ -75,8 +75,8 @@ Describe 'version.ps1' { } } - Assert-MockCalled -CommandName 'Get-Content' -Exactly 4 - Assert-MockCalled -CommandName 'Set-Content' -Exactly 4 + Should -Invoke -CommandName 'Get-Content' -Exactly 4 + Should -Invoke -CommandName 'Set-Content' -Exactly 4 } BeforeEach { From 45a7441bfa640748c767b8acfcfa6e6598ba9c2b Mon Sep 17 00:00:00 2001 From: nsingh Date: Tue, 13 Oct 2026 17:50:45 +0530 Subject: [PATCH 2/2] fix: syntax change as per pester v5 --- .version/test/version.tests.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.version/test/version.tests.ps1 b/.version/test/version.tests.ps1 index 798c802..91faca4 100644 --- a/.version/test/version.tests.ps1 +++ b/.version/test/version.tests.ps1 @@ -44,8 +44,8 @@ Describe 'version.ps1' { } } - Should -Invoke -CommandName 'Get-Content' -Exactly 4 - Should -Invoke -CommandName 'Set-Content' -Exactly 4 + Should -Invoke Get-Content -Exactly -Times 4 + Should -Invoke Set-Content -Exactly -Times 4 } It 'matched version is a no-op' { @@ -75,8 +75,8 @@ Describe 'version.ps1' { } } - Should -Invoke -CommandName 'Get-Content' -Exactly 4 - Should -Invoke -CommandName 'Set-Content' -Exactly 4 + Should -Invoke Get-Content -Exactly -Times 4 + Should -Invoke Set-Content -Exactly -Times 4 } BeforeEach {