From eef5c592fb078a1f4ab0a5dc2c1a4e4d98ea0a44 Mon Sep 17 00:00:00 2001 From: Jeffrey <9938813+Raphire@users.noreply.github.com> Date: Sun, 8 Nov 2026 04:48:46 +0100 Subject: [PATCH] fix: update error handling in Test-RegistryKeySnapshotCanBeRestored to use specific ErrorId (#885) --- Tests/Registry-SnapshotApply.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Registry-SnapshotApply.Tests.ps1 b/Tests/Registry-SnapshotApply.Tests.ps1 index 36dfc9b..0df4d96 100644 --- a/Tests/Registry-SnapshotApply.Tests.ps1 +++ b/Tests/Registry-SnapshotApply.Tests.ps1 @@ -221,7 +221,7 @@ Describe 'Test-RegistryKeySnapshotCanBeRestored' { } { Test-RegistryKeySnapshotCanBeRestored -Snapshot $snapshot } | - Should -Throw '*Value was either too large or too small*' + Should -Throw -ErrorId 'InvalidCastIConvertible*' } It 'rejects a descendant that is not directly below its declared parent' {