-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
add setUp, setUpBeforeScript, tearDown and tearDownAfterScript functions execution #92
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.
Thank you! 🤩 This will close #47
Can you please add these new functions to the |
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.
Great work ✨
function test_no_function_is_executed_with_execute_function_if_exists() { | ||
local function_name='notExistingFunction' | ||
|
||
assertEmpty "$(executeFunctionIfExists "$function_name")" |
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.
This function does not exist assertEmpty
may be you mean assertNotEquals
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.
Yes, you are right. I'm trying to check why I didn't get any error with this non-existent method
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.
No, thanks to you, We've just added the assert #93 (it needs a refactor, but the first step is there)
📚 Description
You can create functions with the following names in your test script to perform actions before and after test/script:
setUp
If this function exists in the test script it will be executed before each test execution.
setUpBeforeScript
If this function exists in the test script it will be executed only one time before all tests execution.
tearDown
If this function exists in the test script it will be executed after each test execution.
tearDownAfterScript
If this function exists in the test script it will be executed only one time after all tests execution.
✅ To-do list
CHANGELOG.md
to reflect the new feature or fix