Skip to content

test: align with the synced testing conventions - #17

Merged
bvandrc merged 3 commits into
mainfrom
refactor/align-conventions
Sep 27, 2026
Merged

bvandrc merged 3 commits into
mainfrom
refactor/align-conventions

Conversation

@bvandrc

@bvandrc bvandrc commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Requested by Blake · project thread

Before: component-suite.test.tsx split componentTestSuite across two top-level describes and tested TestList in a bare test. It also named literal fixtures in camelCase, had a makeAnonymous helper, and used @ts-ignore and an as unknown as cast to feed values the types refuse.

After: there is one describe per export (ts-unit-testing.md), with execution and registration nested under componentTestSuite. Fixtures are UPPER_CASE, and MOCK_SUITE_ARGS is checked with satisfies. The helper is buildAnonymousComponent, and every deliberately refused value goes through // @ts-expect-error with a reason (ts-testing-all.md). Only tests change; there are still 26 and all pass.

How: the edits are in src/__tests__/component-suite.test.tsx, plus a blank line after the summary in __helpers__/spy-on-tests.ts's doc comment (all.md).

pnpm check and pnpm test:unit pass locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GrSSi8k4q48PmHCXCMFVrN


Generated by Claude Code

One describe per export (TestList, componentTestSuite), build* helper naming, UPPER_CASE fixture literals, satisfies on the suite args, and @ts-expect-error in place of @ts-ignore and an as-cast.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrSSi8k4q48PmHCXCMFVrN
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrSSi8k4q48PmHCXCMFVrN
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

PR Diff Line Count

code comment

${\color{#2da44e}+}$

${\color{#bf8700}\sim}$

${\color{#e5534b}-}$

${\color{#2da44e}+}$

${\color{#e5534b}-}$

Source

${\color{#848d97}\mathbf{0}}$

${\color{#848d97}\mathbf{0}}$

${\color{#e5534b}\mathbf{4}}$

${\color{#848d97}0}$

${\color{#e5534b}6}$

Tests

${\color{#2da44e}111}$

${\color{#bf8700}65}$

${\color{#e5534b}102}$

${\color{#2da44e}1}$

${\color{#e5534b}1}$

Total

${\color{#2da44e}111}$

${\color{#bf8700}65}$

${\color{#e5534b}106}$

${\color{#2da44e}1}$

${\color{#e5534b}7}$

GitHub reports ${\color{#2da44e}+199}$ / ${\color{#e5534b}-200}$

~ is a line changed in place — cloc counts it once rather than as an add plus a delete, so these columns do not sum to GitHub's.
Blank lines are excluded above: ${\color{#848d97}+0}$ / ${\color{#848d97}-0}$.

@bvandrc bvandrc self-assigned this Sep 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 1.42 kB

ℹ️ View Unchanged
Filename Size
dist/index.js 1.42 kB

compressed-size-action

@bvandrc

bvandrc commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

@claude remove coverage from vitest config and add to .gitignore anyways

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrSSi8k4q48PmHCXCMFVrN

bvandrc commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

Done in d2e17e0:

  • Removed the coverage block from vitest.config.ts, so pnpm test:coverage now uses Vitest's defaults (v8 provider and the default reporters, still writing to coverage/).
  • Replaced the .gitignore entry Coverage with coverage/. The old entry was capitalized, so on a case-sensitive filesystem it matched nothing.
  • coverage/ was already committed, so I also untracked it with git rm --cached. Otherwise the ignore rule wouldn't apply. The diff deletes 26 generated files.

pnpm check and pnpm test:unit both pass (26 tests).


Generated by Claude Code

@bvandrc
bvandrc merged commit 6bb4422 into main Sep 27, 2026
5 checks passed
@bvandrc
bvandrc deleted the refactor/align-conventions branch September 27, 2026 14:31
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.

2 participants