Skip to content

docs: document the three-layer test structure in CLAUDE.md#174

Open
Gabrielpanga wants to merge 1 commit into
masterfrom
docs/test-structure-claude-md
Open

docs: document the three-layer test structure in CLAUDE.md#174
Gabrielpanga wants to merge 1 commit into
masterfrom
docs/test-structure-claude-md

Conversation

@Gabrielpanga

Copy link
Copy Markdown
Member

What

Documents the test layout in CLAUDE.md — a new Test structure subsection under Build and Test. This session introduced two test layers that weren't described anywhere in the knowledge base:

Why

The split is non-obvious and easy to trip over:

  • pnpm test ignores tests/integration; the integration suite is opt-in via pnpm test:integration.
  • Integration tests hit the real API, need PLUGGY_CLIENT_ID/PLUGGY_CLIENT_SECRET in .env.test, take ~30+ min, and auto-skip without creds.
  • The payments unit suite scopes nock.disableNetConnect() in tests/payments/utils.ts (not the shared setup) so the integration suite keeps live connections — a subtlety worth recording.

Docs-only. No code changes.

🤖 Generated with Claude Code

This session added a real-sandbox integration suite (tests/integration/, run
via `pnpm test:integration`) and a nock-based payments unit suite
(tests/payments/), neither of which was described in CLAUDE.md. Document the
unit/integration/shared split, the opt-in + auto-skip behaviour of the
integration tests, where credentials come from (.env.test), and why the
payments suite scopes nock.disableNetConnect locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant