Skip to content

test: increase test coverage for slackerror - #413

Merged
mwbrooks merged 3 commits into
mainfrom
mwbrooks-test-coverage-4
Mar 18, 2026
Merged

test: increase test coverage for slackerror#413
mwbrooks merged 3 commits into
mainfrom
mwbrooks-test-coverage-4

Conversation

@mwbrooks

@mwbrooksmwbrooks commented Mar 18, 2026

Copy link
Copy Markdown
Member

Changelog

  • N/A

Summary

This pull request increases the test coverage of the internal/slackerror package. It's a very small code coverage bump, but I wanted to keep the lines of code low. I'll follow-up with more PRs in the future!

All test functions match our new naming and ordering conventions.

Requirements

Rename Test_AppendMessage to Test_Error_AppendMessage to follow the
Test_StructName_FunctionName convention for struct methods. Reorder
Test_Error_AppendMessage, Test_Is, and Test_IsErrorType to their
correct alphabetical positions in the file.
@mwbrooksmwbrooks added this to the Next Release milestone Mar 18, 2026
@mwbrooksmwbrooks self-assigned this Mar 18, 2026
@mwbrooksmwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Mar 18, 2026

@mwbrooksmwbrooks left a comment

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharing a few comments for the brave reviewers!

Comment thread.gitignore
# macOS
.DS_Store

# For GoLand users

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: Just updating the comment to be consistent with the other comments

Comment thread.gitignore

# For GoLand users
# Git
.worktrees/

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: Hope this is alright, but I'm starting to store my git worktrees in slack-cli/.worktrees/ and it would be nice to ignore that directory.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌲 praise: @mwbrooks All things in iteration! Let's keep track of changes in commits instead, I agree.

@codecov

codecovBot commented Mar 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.44%. Comparing base (11917c5) to head (ff6b241).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #413 +/- ##
==========================================
+ Coverage 68.34% 68.44% +0.09% 
==========================================
Files 218 218 Lines 18058 18058 ==========================================
+ Hits 12341 12359 +18 + Misses 4565 4541 -24 - Partials 1152 1158 +6 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks
mwbrooks marked this pull request as ready for review March 18, 2026 22:54
@mwbrooks
mwbrooks requested a review from a team as a code ownerMarch 18, 2026 22:54

@zimegzimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks Another sweet set of changes - it's neat to find a standard path for worktrees too! 🧪 ✨

}{
"returns true when error contains the code": {
err: New(ErrAccessDenied),
errorCode: ErrAccessDenied,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚧 praise: Nice choice!

Comment thread.gitignore

# For GoLand users
# Git
.worktrees/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌲 praise: @mwbrooks All things in iteration! Let's keep track of changes in commits instead, I agree.

@mwbrooks

Copy link
Copy Markdown
MemberAuthor

@zimeg Thanks for the quick review! 🙇🏻 I'll continue to try to keep these test coverage PRs smaller, so they aren't a burden to look over 😄

@mwbrooks
mwbrooks merged commit df02bbc into mainMar 18, 2026
8 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-test-coverage-4 branch March 18, 2026 23:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code healthM-T: Test improvements and anything that improves code healthsemver:patchUse on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mwbrooks@zimeg