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

Add -TrimWhitespace to Should-BeString #2501

Merged
merged 1 commit into from
Jun 15, 2024
Merged

Add -TrimWhitespace to Should-BeString #2501

merged 1 commit into from
Jun 15, 2024

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Jun 15, 2024

Fix #2496

@nohwnd nohwnd merged commit 9b11cad into main Jun 15, 2024
11 checks passed
@nohwnd nohwnd deleted the add-trim-whitespace branch June 15, 2024 11:29
@@ -15,6 +16,11 @@
$Actual = $Actual -replace '\s'
}

if ($TrimWhitespace) {
$Expected = $Expected -replace '^\s+|\s+$'
$Actual = $Actual -replace '^\s+|\s+$'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Regex over Trim() because $Actual might not be string?

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.

Add trimWhitespace to Should-beString
2 participants