Skip to content

Commit 7879101

Browse files
authored
Merge pull request #475 from TypedDevs/codex/rename-helpers-to-helper-prefix
Rename helpers functions to helper prefix
2 parents f5a3d10 + 46dc21e commit 7879101

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
- Allow `assert_have_been_called_with` to check arguments of specific calls
6868
- Enable parallel tests on Windows
6969
- Add `assert_not_called`
70-
- Improve `find_total_tests` performance
70+
- Improve `helper::find_total_tests` performance
7171
- Added `assert_match_snapshot_ignore_colors`
7272
- Optimize `runner::parse_result_sync`
7373
- Fix `parse_result_parallel` template

docs/blog/2025-06-01-release-0-20.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Parallel execution is now enabled on Windows, greatly reducing running time for
9595
## 🌾 Miscellaneous
9696

9797
* Deprecate `# data_provider` in favor of `# @data_provider`
98-
* Improve `find_total_tests` and `runner::parse_result_sync` performance
98+
* Improve `helper::find_total_tests` and `runner::parse_result_sync` performance
9999

100100
---
101101

docs/blog/2025-06-18-release-0-21.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ID: {{ignore}}
4646

4747
### Count data providers accurately
4848

49-
`find_total_tests` now includes cases provided by `@data_provider`, giving a more accurate count of total executed tests.
49+
`helper::find_total_tests` now includes cases provided by `@data_provider`, giving a more accurate count of total executed tests.
5050

5151
## 🐛 Bugfix
5252

src/console_header.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function console_header::print_version() {
2626
if [[ ${#files[@]} -eq 0 ]]; then
2727
total_tests=0
2828
else
29-
total_tests=$(helpers::find_total_tests "$filter" "${files[@]}")
29+
total_tests=$(helper::find_total_tests "$filter" "${files[@]}")
3030
fi
3131

3232
if env::is_header_ascii_art_enabled; then

src/helpers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ function helper::trim() {
210210
echo "$trimmed_string"
211211
}
212212

213-
function helpers::get_latest_tag() {
213+
function helper::get_latest_tag() {
214214
if ! dependencies::has_git; then
215215
return 1
216216
fi
@@ -222,7 +222,7 @@ function helpers::get_latest_tag() {
222222
head -n 1
223223
}
224224

225-
function helpers::find_total_tests() {
225+
function helper::find_total_tests() {
226226
local filter=${1:-}
227227
local files=("${@:2}")
228228

src/upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function upgrade::upgrade() {
44
local script_path
55
script_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66
local latest_tag
7-
latest_tag="$(helpers::get_latest_tag)"
7+
latest_tag="$(helper::get_latest_tag)"
88

99
if [[ "$BASHUNIT_VERSION" == "$latest_tag" ]]; then
1010
echo "> You are already on latest version"

tests/acceptance/bashunit_upgrade_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function tear_down_after_script() {
2929
function set_up() {
3030
./build.sh "$TMP_DIR" >/dev/null
3131
if [[ "$ACTIVE_INTERNET" == true ]] && [[ "$HAS_GIT" == true ]]; then
32-
LATEST_VERSION="$(helpers::get_latest_tag)"
32+
LATEST_VERSION="$(helper::get_latest_tag)"
3333
else
3434
LATEST_VERSION="${BASHUNIT_VERSION}"
3535
fi

tests/unit/helpers_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ a17e6816669ec8d0f18ed8c6d5564df9fc699bf9 refs/tags/0.10.0
227227
b546c693198870dd75d1a102b94f4ddad6f4f3ea refs/tags/0.2.0
228228
732ea5e8b16c3c05f0a6977b794ed7098e1839e2 refs/tags/0.3.0
229229
EOF
230-
assert_same "0.10.1" "$(helpers::get_latest_tag)"
230+
assert_same "0.10.1" "$(helper::get_latest_tag)"
231231
unset -f git # remove the mock
232232
}
233233

@@ -258,7 +258,7 @@ function test_normalize_test_function_name_with_interpolation() {
258258
}
259259

260260
function helpers_test::find_total_in_subshell() {
261-
bash -c 'source "$1"; shift; helpers::find_total_tests "$@"' bash "$BASHUNIT_ROOT_DIR/src/helpers.sh" "$@"
261+
bash -c 'source "$1"; shift; helper::find_total_tests "$@"' bash "$BASHUNIT_ROOT_DIR/src/helpers.sh" "$@"
262262
}
263263

264264
function test_find_total_tests_no_files() {

0 commit comments

Comments
 (0)