From 1137d655113cf52b91ceb4bff096a7a37804354a Mon Sep 17 00:00:00 2001 From: mdaneri Date: Sat, 4 Jan 2025 15:23:34 -0800 Subject: [PATCH] fix Server.Tests --- tests/unit/Server.Tests.ps1 | 4 ++++ tests/unit/_.Tests.ps1 | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/Server.Tests.ps1 b/tests/unit/Server.Tests.ps1 index f9f10a72b..915e14dbb 100644 --- a/tests/unit/Server.Tests.ps1 +++ b/tests/unit/Server.Tests.ps1 @@ -7,6 +7,10 @@ BeforeAll { Get-ChildItem "$($src)/*.ps1" -Recurse | Resolve-Path | ForEach-Object { . $_ } Import-LocalizedData -BindingVariable PodeLocale -BaseDirectory (Join-Path -Path $src -ChildPath 'Locales') -FileName 'Pode' + # Import Pode Assembly + $helperPath = (Split-Path -Parent -Path $path) -ireplace 'unit', 'shared' + . "$helperPath/TestHelper.ps1" + Import-PodeAssembly -SrcPath $src $PodeContext = @{ Server = $null diff --git a/tests/unit/_.Tests.ps1 b/tests/unit/_.Tests.ps1 index b952325be..917b4fe00 100644 --- a/tests/unit/_.Tests.ps1 +++ b/tests/unit/_.Tests.ps1 @@ -24,7 +24,8 @@ BeforeDiscovery { BeforeAll { $path = $PSCommandPath $src = (Split-Path -Parent -Path $path) -ireplace '[\\/]tests[\\/]unit', '/src/' - + + # Import Pode Assembly $helperPath = (Split-Path -Parent -Path $path) -ireplace 'unit', 'shared' . "$helperPath/TestHelper.ps1" Import-PodeAssembly -SrcPath $src