Skip to content

Add theme helper and ThemeToggle tests#33

Merged
mikewheeleer merged 2 commits into
Agentpay-Org:mainfrom
Errordog2:codex/theme-toggle-tests-16
Jun 19, 2026
Merged

Add theme helper and ThemeToggle tests#33
mikewheeleer merged 2 commits into
Agentpay-Org:mainfrom
Errordog2:codex/theme-toggle-tests-16

Conversation

@Errordog2

Copy link
Copy Markdown
Contributor

Closes #16.

Summary

  • Add focused Jest coverage for src/lib/theme.ts read/write/effective-theme helpers.
  • Add Testing Library coverage for ThemeToggle rendering, aria-pressed state, persisted selections, and documentElement.dark class changes.
  • Mock window.matchMedia in the tests so jsdom can exercise system theme behavior.

Validation

  • Static inspection against the existing Jest/Testing Library setup.
  • Tests are scoped to the requested files and do not add runtime dependencies.

No payment details are posted publicly.

@mikewheeleer

Copy link
Copy Markdown
Contributor

clean little suite for the theme helper and ThemeToggle, thanks for this. lgtm 👍

@mikewheeleer mikewheeleer merged commit 27067b1 into Agentpay-Org:main Jun 19, 2026
1 check passed
@Errordog2

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review and merge. Since issue #16 is part of the GrantFox OSS / maybe rewarded campaign, is there any reward-tracking, rating, or confirmation step I should complete after merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for the theme helper and ThemeToggle component

2 participants