Skip to main content
Glama
testing.md1.3 kB
# Testing Standards [Purpose: guide what to test, where tests live, and how to structure them] ## Philosophy - Test behavior, not implementation - Prefer fast, reliable tests; minimize brittle mocks - Cover critical paths deeply; breadth over 100% pursuit ## Organization Options: - Co-located: `component.tsx` + `component.test.tsx` - Separate: `/src/...` and `/tests/...` Pick one as default; allow exceptions with rationale. Naming: - Files: `*.test.*` or `*.spec.*` - Suites: what is under test; Cases: expected behavior ## Test Types - Unit: single unit, mocked dependencies, very fast - Integration: multiple units together, mock externals only - E2E: full flows, minimal mocks, only for critical journeys ## Structure (AAA) ```typescript it('does X when Y', () => { // Arrange const input = setup(); // Act const result = act(input); // Assert expect(result).toEqual(expected); }); ``` ## Mocking & Data - Mock externals (API/DB); never mock the system under test - Use factories/fixtures; reset state between tests - Keep test data minimal and intention-revealing ## Coverage - Target: [% overall]; higher for critical domains - Enforce thresholds in CI; exceptions require review rationale --- _Focus on patterns and decisions. Tool-specific config lives elsewhere._

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ssoma-dev/mcp-server-lychee-redmine'

If you have feedback or need assistance with the MCP directory API, please join our Discord server