Skip to content

Commit 018390e

Browse files
authored
Merge pull request #297 from ishuar/ux/fix-trailing-slash
fix: Double `/` on Running script
2 parents ed39a1e + f78d4bf commit 018390e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Add assertions to log file
66

7+
- Improve UX by Removing trailing slashes `/` from the test directories naming output.
8+
79
## [0.14.0](https://github.com/TypedDevs/bashunit/compare/0.13.0...0.14.0) - 2024-07-14
810

911
- Fix echo does not break test execution results

src/helpers.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ function helper::unset_if_exists() {
8686
}
8787

8888
function helper::find_files_recursive() {
89-
local path="$1"
89+
## Remove trailing slash using parameter expansion
90+
local path="${1%%/}"
9091

9192
if [[ "$path" == *"*"* ]]; then
9293
eval find "$path" -type f -name '*[tT]est.sh' | sort | uniq

0 commit comments

Comments
 (0)