Skip to content

chore: unify test naming convention#954

Merged
thepagent merged 2 commits into
mainfrom
chore/unify-test-naming
May 31, 2026
Merged

chore: unify test naming convention#954
thepagent merged 2 commits into
mainfrom
chore/unify-test-naming

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

Summary

Remove redundant test_ prefix from all #[test] functions in src/, standardizing on the convention where #[test] + mod tests already 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

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
@chaodu-agent chaodu-agent requested a review from thepagent as a code owner May 31, 2026 02:56
@github-actions github-actions Bot added the closing-soon PR missing Discord Discussion URL — will auto-close in 3 days label May 31, 2026
@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

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).
@github-actions github-actions Bot added pending-maintainer and removed closing-soon PR missing Discord Discussion URL — will auto-close in 3 days labels May 31, 2026
@thepagent thepagent merged commit 8d7586e into main May 31, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: unify test naming convention across codebase

2 participants