-
-
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
Fixed typos, split ErrorRecord describe into two Contexts #199
Conversation
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 great! Mostly minor issues I'm picking up here, but overall it looks a lot more clear.
Thank you!! 💖
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
$_ | ||
It 'sometimes has a reference to the object that caused the error' { | ||
# But not always! | ||
$Error[0].TargetObject | Should -BeNullOrEmpty |
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.
If we can have this as part of a separate test case that throws an error with no target object (I think simple throw
statements don't assign a target object, possibly?) this might be better served.
If not, it might be better to remove this assertion.
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.
I agree with just removing that assertion all together. Since we have basically that same assertion on line 38.
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
PSKoans/Koans/Constructs and Patterns/AboutErrorHandling.Koans.ps1
Outdated
Show resolved
Hide resolved
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
….ps1 Co-Authored-By: Joel Sallow (/u/ta11ow) <32407840+vexx32@users.noreply.github.com>
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 great!
Thank you for the contribution!! 💖
PR Summary
Resolves #196
Context
Couple of minor typos corrected. Big change to the Describe ErrorRecord koan as there was a mix of $Error and $ErrorRecord. Splitting them into separate contexts seems a more intuitive approach for the user.
Changes
Checklist