Skip to content

test(charm): clean up and consolidate charm tests#390

Merged
zimeg merged 1 commit intomainfrom
charm-tests-followup
Mar 11, 2026
Merged

test(charm): clean up and consolidate charm tests#390
zimeg merged 1 commit intomainfrom
charm-tests-followup

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Mar 11, 2026

Changelog

Removes redundant tests and consolidates scattered test functions into table-driven tests in the
style package.

Summary

Follow-up to #365 (charm-lipgloss-migration). That PR added new charm/lipgloss tests alongside existing aurora tests, resulting in some redundancy and inconsistent test patterns. This PR cleans that up.

Removed redundant tests:

  • TestEmojiEmpty — subset of TestEmoji (empty-string case folded in)
  • TestRenderrender() is already exercised by all 16 testStyleFunc calls
  • Test_styleExampleLine — internal helper already covered by Test_ExampleTemplatef_Charm
  • TestStyleFlags_CharmDisabled — folded into TestStyleFlags as a table case

Consolidated into table-tests:

  • TestGetKeyLengthZero/Matched/Long/First (4 funcs → 1)
  • TestSectionfEmpty/Header/EmptyEmoji (3 funcs → 1)
  • TestSectionSecondaryfEmpty/Plain/Format/Indent (4 funcs → 1)
  • TestCommandfPrimary/Secondary (2 funcs → 1)

Test steps

make test testdir=internal/style
make lint

Requirements

@srtaalej srtaalej added this to the Next Release milestone Mar 11, 2026
@srtaalej srtaalej self-assigned this Mar 11, 2026
@srtaalej srtaalej requested a review from a team as a code owner March 11, 2026 18:08
@srtaalej srtaalej added experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment labels Mar 11, 2026
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.48%. Comparing base (755ccfe) to head (3aa6640).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #390   +/-   ##
=======================================
  Coverage   65.47%   65.48%           
=======================================
  Files         218      218           
  Lines       18120    18120           
=======================================
+ Hits        11864    11865    +1     
- Misses       5161     5162    +1     
+ Partials     1095     1093    -2     

☔ 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.

@srtaalej srtaalej changed the title test(charm): clean up charm tests test(charm): clean up and consolidate charm tests Mar 11, 2026
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@srtaalej Nice though let's hope to keep tests with code changes onward 🚢 💨

@zimeg zimeg merged commit 8700073 into main Mar 11, 2026
8 checks passed
@zimeg zimeg deleted the charm-tests-followup branch March 11, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experiment Experimental feature accessed behind the --experiment flag or toggle semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants