chore: unify test naming convention#954
Merged
Merged
Conversation
Unify test naming convention by removing the redundant test_ prefix from all #[test] functions in src/. The #[test] attribute and mod tests already provide sufficient context. Renamed 50 test functions across 4 files: - src/setup/config.rs (2) - src/setup/validate.rs (4) - src/error_display.rs (21) - src/remind.rs (23) Helper functions (test_cron_job, test_channel, test_trigger) that return test fixtures are intentionally kept unchanged. Closes #953
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
validate_agent_command and validate_channel_id test functions had the same name as the production functions they were testing, causing the test to call itself (0 args) instead of the production fn (1 arg).
thepagent
approved these changes
May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove redundant
test_prefix from all#[test]functions insrc/, standardizing on the convention where#[test]+mod testsalready provides sufficient context.Changes
Renamed 50 test functions across 4 files:
src/setup/config.rs(2 functions)src/setup/validate.rs(4 functions)src/error_display.rs(21 functions)src/remind.rs(23 functions)Helper functions that return test fixtures (
test_cron_job,test_channel,test_trigger) are intentionally kept unchanged — they are not#[test]functions.Testing
Purely mechanical rename — no logic changes. CI will validate.
Closes #953