Skip to content

Commit

Permalink
This test seems to crash the build on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
splatteredbits committed Jan 29, 2024
1 parent 09bdef4 commit bb79aaf
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Tests/install.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BeforeAll {
Get-PSRepository -Name $script:latestNoOpModule.Repository | Select-Object -ExpandProperty 'SourceLocation'
$script:latestNoOpLockFile = @"
{
"PSModules": {
"PSModules": {
"name": "NoOp",
"version": "$($script:latestNoOpModule.Version)",
"repositorySourceLocation": "$($script:defaultLocation)"
Expand All @@ -31,7 +31,7 @@ BeforeAll {
param(
[Parameter(Mandatory)]
[String] $Contents,

[String] $In = $script:testRoot
)

Expand All @@ -50,7 +50,7 @@ BeforeAll {
param(
[Parameter(Mandatory)]
[String] $Contents,

[String] $In = $script:testRoot
)

Expand All @@ -71,7 +71,7 @@ BeforeAll {
[hashtable] $Module,

[String] $In = $script:testRoot,

[String] $UsingDirName = 'PSModules'
)

Expand Down Expand Up @@ -114,12 +114,12 @@ BeforeAll {
Select-Object -Unique |
Should -HaveCount $expectedCount
}

function ThenSucceeded
{
$Global:Error | Should -BeNullOrEmpty
}

function WhenInstalling
{
[CmdletBinding()]
Expand All @@ -144,7 +144,7 @@ AfterAll {
}

Describe 'prism install' {
BeforeEach {
BeforeEach {
$script:testRoot = $null
$script:moduleList = @()
$script:failed = $false
Expand Down Expand Up @@ -271,7 +271,7 @@ Describe 'prism install' {
$Global:DebugPreference = [Management.Automation.ActionPreference]::Continue
$output = WhenInstalling 5>&1
$output | Write-Verbose

# Import-Module doesn't output any debug messages.
# Save-Module does.
# From PowerShellGet. Can't find PackageManagement-only debug messages.
Expand Down Expand Up @@ -358,7 +358,8 @@ Describe 'prism install' {
ThenInstalled @{ 'NoOp' = '1.0.0' }
}

It 'should find repositories when Get-PSRepository has never been called before' {
$skip = (Test-Path -Path 'variable:IsMacOS') -and $IsMacOS
It 'should find repositories when Get-PSRepository has never been called before' -Skip:$skip {
GivenPrismFile @'
{
"PSModules": [
Expand Down

0 comments on commit bb79aaf

Please sign in to comment.