Skip to content

Commit

Permalink
(chocolatey#3364) Remove ounusable tab completion tests
Browse files Browse the repository at this point in the history
These tests are verifying the old method and are targeting an
implementation detail, rather than actually checking the tab completion
results, which the following tests do anyway.

As such, we're best off removingthem as there is no direct way to check
the same things for the Register-ArgumentCompleter method. The tests for
the tab completion results themselves covers this adequately already.
  • Loading branch information
vexx32 committed Nov 6, 2024
1 parent 3b7baf7 commit 14de0ca
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/pester-tests/chocolateyProfile.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ Describe "Chocolatey Profile" -Tag Chocolatey, Profile, Environment {
}

Context "Tab Completion" {
It "Should Exist" {
Test-Path Function:\TabExpansion | Should -BeTrue
}

It "Should have overridden TabExpansion with a new scriptblock including ChocolateyTabExpansion" {
[bool]((Get-Command TabExpansion).ScriptBlock -match "ChocolateyTabExpansion") | Should -BeTrue
}

It "Should list completions for all Top Level Commands, sorted alphabetically, but not aliases or unpackself" {
$Command = "choco "
$Completions = (TabExpansion2 -inputScript $Command -cursorColumn $Command.Length).CompletionMatches.CompletionText
Expand Down

0 comments on commit 14de0ca

Please sign in to comment.