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 failing tests with command not found #325

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

Chemaclass
Copy link
Member

@Chemaclass Chemaclass commented Sep 13, 2024

📚 Description

Fixes: #309 by @mkonig

Right now, when using a not found command in a test, this is ignored and makes the test pass as all good... This makes TDD impossible by definition.

We need to allow starting with a failing test writing what we want to have before having it.

Screenshot 2024-09-13 at 22 27 13

This should fail! 🙃

🔖 Changes

  • Check in the test_execution_result if contains "command not found" in such a case extract the error msg and render it as a failing test

Disclaimer: I didn't know how to write automated tests for this, because the logic is about making a test fail and I couldn't find a way to make a passing test when is failing... at least I share some screenshots. If you are reading this and you want to contribute adding an automated test for this change, please do! Thanks :)

✅ To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix

Screenshot 2024-09-13 at 22 12 22

@Chemaclass Chemaclass added the bug Something isn't working label Sep 13, 2024
@Chemaclass Chemaclass self-assigned this Sep 13, 2024
@Chemaclass Chemaclass merged commit 00a45c8 into main Sep 13, 2024
7 checks passed
@Chemaclass Chemaclass deleted the feat/309-test-with-syntax-error-should-fail branch September 13, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test with syntax error should fail
2 participants