bashunit
bashunit copied to clipboard
Allow interpolating arguments in data providers output
When you use providers, the name of the test is printed next to the data used as argument of the provider. For example:
This ⬆️ was done here: https://github.com/TypedDevs/bashunit/issues/203 (tests examples from fizzbuzz-bashunit)
💡 Idea
Allow interpolating these arguments in the names of the tests through some special syntax, for example ::1::, ::2::...
function test_returns_fizz_when_multiple_of_3_like_::1::_given() { ... }
function test_returns_fizz_when_multiple_of_5_like_::1::_given() { ... }
✓ Passed: Returns fizz when multiple of 3 like '3' given
✓ Passed: Returns fizz when multiple of 3 like '6' given
✓ Passed: Returns fizz when multiple of 5 like '5' given
✓ Passed: Returns fizz when multiple of 5 like '10' given