-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Fixes auto-succeeding pester tests in AboutComparison and AboutStrings #214
Conversation
It "adds strings together" was passing the pester test without user input. Replaced the contents of $String1 with '__' so the user can solve it.
Auto-passing tests: It 'is a simple test' It 'returns $true if either input is $true' It 'negates a boolean value' In all three instances, __ evaluates to $true, which causes the tests to pass. I replaced __ with $__ in these instances to make sure the tests fail.
Looks good! Can we use $____ rather than $__ (four underscores instead of two) just so it's very clear we're not trying to reference $_? |
Added two extra underscores to each $__ to make sure no one will confuse $__ for $_
Good point/idea! Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much better, thank you! 😄
One last one and this is good to merge!
Longer blanks! Better blanks! Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
I like the longer blanks. They stand out more which is always a good thing. Do you have a preference on standardizing the number of underscores? perhaps 4 of each? ____ for int/double, I know that the Foundations Koans could use a good freshening up in that regard. sounds like a project... 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you! 💖
@EVWorth yeah it's changed over time as I realize this might be a bit clearer for various reasons. I'd say.... if we're expecting:
Of course, with strings it's good to think about whether the string you expect might make use of interpolation and should thus use double quotes instead of single quotes. 🙂 |
Ok awesome. I'll use that going forward. I was thinking about the ' ' vs "" thing earlier. I think it makes sense to differentiate between those as well. |
🤔 Sigh, I need to add a contributing style guide lmao |
If you do I'll contribute to it and ask you 50 billion questions you don't want to have to answer ;) |
I don't mind answering haha, it's all good. Just something I should do. I guess I'll make an issue so I don't forget. :) |
PR Summary
This PR fixes pester tests from auto-succeeding.
This PR Resolves Issues #212 and #213
I tested these changes to make sure they initially fail the pester tests successfully
Context
The solution for the AboutComparison issues came from: #212 (comment)
The solution for the AboutString issues came from: #213 (comment)
Changes
In AboutStrings:
In AboutComparison.Koans.ps1
Checklist