Skip to content
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

Fixed detection of empty tests #835

Merged
merged 5 commits into from
Jan 28, 2018
Merged

Fixed detection of empty tests #835

merged 5 commits into from
Jan 28, 2018

Conversation

RemcoKapinga
Copy link

This is a fix for issue #833

This is a fix for issue #833
@nohwnd
Copy link
Member

nohwnd commented Aug 26, 2017

Thanks for the PR, but you have to support PowerShell v2, please review the failure log on our build server to learn more about why it fails on PowerShell v2. (Imho it's the Ast, and you should rather depend on regex - at least for powershell 2).

Functions/It.ps1 Outdated
@@ -158,8 +158,12 @@ function ItImpl

#mark empty Its as Pending
#[String]::IsNullOrWhitespace is not available in .NET version used with PowerShell 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Remco-74, exactly in this line is an answer why the sollution proposed by you doesn't work with PowerShell 2.

Can you change your code to use the old detection method when it's run with PowerShell 2.0 and the new one for the newer version of PowerShell?

Copy link
Contributor

@it-praktyk it-praktyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Remco-74, please read my comment and apply proposed changes. Thank you.

Copy link
Contributor

@it-praktyk it-praktyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've corrected it to be compatible with PowerShell 2.0

@nohwnd nohwnd merged commit 0b994c9 into pester:master Jan 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants