Skip to content

Conversation

@elebeaup
Copy link
Contributor

@elebeaup elebeaup commented Feb 19, 2025

πŸ“š Description

Fixes: #390

πŸ”– Changes

  • Traps the exit code when running a test

πŸ–ΌοΈ Demo

Before

image

After

image

βœ… To-do list

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

Copy link
Member

@Chemaclass Chemaclass left a comment

Choose a reason for hiding this comment

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

Wow amazing! Thanks πŸ₯‡

@Chemaclass Chemaclass changed the title fix: fix false negative with set -e Fix false negative with set -e Feb 19, 2025
Comment on lines +149 to +154
trap '
state::set_test_exit_code $?
runner::run_tear_down
runner::clear_mocks
state::export_subshell_context
' EXIT
Copy link
Member

Choose a reason for hiding this comment

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

Very clever 🧠 πŸ‘πŸΌ

@Chemaclass Chemaclass merged commit 9fd3794 into TypedDevs:main Feb 19, 2025
13 checks passed
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.

sourcing a file with set -e causes the tests to always succeed

2 participants