Skip to content

docs: document test expectations (CONTRIBUTING + CLAUDE.md) - #35

Merged
Carl723000 merged 2 commits into
ClaudeCodeUsage:mainfrom
nickearnshaw:nickearnshaw/test-docs
Jun 15, 2026
Merged

Carl723000 merged 2 commits into
ClaudeCodeUsage:mainfrom
nickearnshaw:nickearnshaw/test-docs

Conversation

@nickearnshaw

@nickearnshaw nickearnshaw commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Documents the test harness now that the project has one, so contributors know what's expected.

CONTRIBUTING.md — rewrites the Tests section:

  • How to run (npm test) and that CI runs the same on every PR.
  • Where tests live (src/test/*.test.ts → compiled to out/test/), and that the directory must stay flat — the script globs out/test/*.test.js a single level deep (kept single-level for Node-version portability), so nested files would be silently skipped.
  • What belongs here — pure, dependency-free logic (pricing, aggregation, quota, i18n) — with a pointer to the worked example.
  • What doesn't: live vscode API code needs @vscode/test-electron, not set up yet.

CLAUDE.md — updates the Tests convention from "a node:test suite is planned (see #25)" to reflect that it now exists.

⚠️ Depends on #32

This documents the framework added in #32, so please merge #32 first. Kept as a separate, discussion-light docs PR on purpose — single concern, can merge right after the framework lands. Happy to rebase if #32 changes anything material.

🤖 Generated with Claude Code

nickearnshaw and others added 2 commits June 12, 2026 23:34
Replace the "no test suite yet" note with how the node:test harness
works: where tests live (src/test/*.test.ts -> out/test/), how to run
(npm test), what belongs here (pure logic) vs what needs
@vscode/test-electron, and a pointer to the worked example.

Depends on the test-framework PR (ClaudeCodeUsage#32) landing first.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- CLAUDE.md: the node:test suite now exists (was "planned, see ClaudeCodeUsage#25").
- CONTRIBUTING: spell out that src/test/ must stay flat, since the test
  script globs out/test/*.test.js a single level deep (kept single-level
  for Node-version portability) so nested files would be skipped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nickearnshaw nickearnshaw changed the title docs: document test expectations in CONTRIBUTING docs: document test expectations (CONTRIBUTING + CLAUDE.md) Jun 12, 2026
@Carl723000
Carl723000 merged commit cbd8f06 into ClaudeCodeUsage:main Jun 15, 2026
1 check passed
@Carl723000 Carl723000 added the docs Documentation label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants