Skip to content

Commit

Permalink
test(scoop-status): replace "Import-Module" calls with dot-sourced ex…
Browse files Browse the repository at this point in the history
…ecution; remove unused variables and dead code
  • Loading branch information
BinToss committed Jan 29, 2025
1 parent ba8322c commit 2767d0e
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions test/Scoop-Status.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ BeforeAll {
. "$PSScriptRoot\..\lib\manifest.ps1" # 'manifest' 'parse_json' "install_info"
. "$PSScriptRoot\..\lib\versions.ps1" # 'Select-CurrentVersion'
. "$PSScriptRoot\..\lib\core.ps1" # 'versiondir'
Import-Module "$PSScriptRoot\..\lib\core.ps1" -Function 'versiondir'

# check if scoop needs updating
$currentdir = versiondir 'scoop' 'current'
$needs_update = $false
$bucket_needs_update = $false
$script:network_failure = $false
$no_remotes = $args[0] -eq '-l' -or $args[0] -eq '--local'
if (!(Get-Command git -ErrorAction SilentlyContinue)) { $no_remotes = $true }
$list = @()
if (!(Get-FormatData ScoopStatus)) {
Update-FormatData "$PSScriptRoot\..\supporting\formats\ScoopTypes.Format.ps1xml"
}
}

# script-level content
Expand All @@ -30,7 +17,7 @@ Describe -Skip 'Show status and check for new app versions' -Tag 'Scoop' {

Describe 'Test-UpdateStatus' -Tag 'Scoop' {
BeforeAll {
Import-Module "$PSScriptRoot/../libexec/scoop-status.ps1" -Function 'Test-UpdateStatus'
. "$PSScriptRoot/../libexec/scoop-status.ps1"
}
# todo
It -Skip 'should return $true if $commits is falsy' {
Expand Down

0 comments on commit 2767d0e

Please sign in to comment.