Skip to content

If Describe block in Pester test is lowercased then the 'Run tests/Debug tests' code lense does not appear #822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bergmeister opened this issue Dec 14, 2018 · 0 comments · Fixed by #823

Comments

@bergmeister
Copy link
Contributor

bergmeister commented Dec 14, 2018

Given the following foo.tests.ps1 file:

describe "foo" {
    It "bar" {
        
    }
}

The VS-Code extension does not show the code lens shows Run tests/Debug tests only if the describe keyword starts with an upper case, Pester does not require that. Using the latest version of the PowerShell extension (1.10.1) and code-insiders 1.31.0

image

image

image

I suspect that PesterKeywords.TryGetValue(commandName, out pesterCommandType) below is case sensitive, the dictionary should be initialized using StringComparer.OrdinalIgnoreCase
https://github.com/PowerShell/PowerShellEditorServices/blob/master/src/PowerShellEditorServices/Symbols/PesterDocumentSymbolProvider.cs#L203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant