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

WIP: Adds Bugfixing kata #344

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

indented-automation
Copy link
Contributor

PR Summary

Fixes #282

Context

A draft for bug fixing kata's. This is going to take a little time. Please add a WIP.

I would, however, appreciate any feedback as and when anyone feels like commenting :)

Changes

Adds Bug fixing kata

Checklist

  • Pull Request has a meaningful title.
  • Summarised changes.
  • Pull Request is ready to merge & is not WIP.
  • Added tests / only testable interactively.
    • Make sure you add a new test if old tests do not effectively test the code changed.
  • Added documentation / opened issue to track adding documentation at a later date.

@vexx32 vexx32 changed the title Adds Bugfixing kata WIP: Adds Bugfixing kata Jan 8, 2020
@vexx32 vexx32 added Category-Koans Invoking the Great Doubt PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. PR-Needs-Review 🔍 Let's take a closer look! labels Jan 13, 2020
@vexx32 vexx32 added this to In progress in Koan Topic Tracking via automation Jan 13, 2020
Comment on lines 91 to 96
function Debug-Me {
$process = Get—Process -Id $PID
if ($process -and $process.Name -eq 'powershell') {
Write-Host 'you must be using PowerShell'
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

This won't throw, will it? Might need to swap your Write-Host for a throw :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will throw (as-is) until the bug is fixed :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me tweak it just a little, to make it less obvious.

Copy link
Owner

Choose a reason for hiding this comment

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

Even the new example here doesn't look like it'll throw? Pester's Should -Throw will expect a terminating error and nothing else... what here is going to throw? XD

@vexx32
Copy link
Owner

vexx32 commented Apr 15, 2020

@indented-automation came across this in the Discord just now -- need one where misplacing the array index sometimes causes a bug. So, for example, sometimes something returns two objects with a string property each, sometimes just one, so an expression like $result.Propertyname[0] works in one case but fails in another.

@vexx32 vexx32 changed the base branch from master to main June 13, 2020 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Koans Invoking the Great Doubt PR-Awaiting-Author ✏️ Waiting on a response from the user who submitted the PR. PR-Needs-Review 🔍 Let's take a closer look!
Projects
Koan Topic Tracking
  
In progress
Development

Successfully merging this pull request may close these issues.

Add Katas - Bugfixing
2 participants