Skip to content

Conversation

@i11v
Copy link
Owner

@i11v i11v commented Jan 23, 2026

Summary

  • Add comprehensive test coverage infrastructure for RFC 8621 JMAP spec
  • Implemented features run tests and fail if broken
  • Unimplemented features are skipped (not failed)
  • Feature completeness is tracked and reportable via CLI

What's Included

Core Infrastructure

  • tests/config/capabilities.ts - Registry of all 31 JMAP methods with implementation status
  • tests/spec-runner/parser.ts - Markdown spec file parser
  • scripts/generate-spec-tests.ts - Test file generator
  • scripts/spec-coverage.ts - Coverage reporting CLI

New npm Scripts

Script Description
pnpm test:spec Run spec compliance tests
pnpm generate:spec-tests Regenerate tests from spec files
pnpm coverage:spec Show implementation coverage
pnpm coverage:spec --by-type Coverage grouped by object type

Current Coverage

15/31 methods implemented (48.4%)

✓ Mailbox: get, set, query, queryChanges
✓ Email: get, set, query, queryChanges, copy, import
✓ EmailSubmission: get, set, query, queryChanges, changes
○ Thread, Identity, VacationResponse, SearchSnippet, Blob, Core: pending

Test plan

  • pnpm test - Unit tests pass (234 tests)
  • pnpm test:spec - Spec tests pass (194 pass, 252 skip)
  • pnpm test:all - All tests pass (432 pass, 252 skip)
  • pnpm typecheck - No TypeScript errors
  • pnpm coverage:spec - Shows accurate coverage

🤖 Generated with Claude Code

i11v added 2 commits January 23, 2026 10:44
Implement comprehensive test coverage for RFC 8621 JMAP spec where:
- Implemented features run tests and fail if broken
- Unimplemented features are skipped (not failed)
- Feature completeness is tracked and reportable

Core components:
- tests/config/capabilities.ts: Registry of all 31 JMAP methods with
  implementation status (currently 15/31 = 48.4% complete)
- tests/spec-runner/parser.ts: Markdown spec file parser that extracts
  test cases from jmap-spec/specs/
- scripts/generate-spec-tests.ts: Generates Vitest tests from spec files
- scripts/spec-coverage.ts: CLI tool for coverage reporting

New npm scripts:
- pnpm test:spec: Run spec compliance tests
- pnpm generate:spec-tests: Regenerate tests from spec files
- pnpm coverage:spec: Show implementation coverage (--by-type, --json)

Generated 14 test files with 446 total tests (194 run, 252 skipped).
@i11v i11v merged commit fe5641a into main Jan 23, 2026
5 checks passed
effect-jmap-release bot pushed a commit that referenced this pull request Jan 23, 2026
# [0.6.0](v0.5.0...v0.6.0) (2026-01-23)

### Features

* Add spec-based test coverage with capability tracking ([#12](#12)) ([fe5641a](fe5641a))
@effect-jmap-release
Copy link

🎉 This PR is included in version 0.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@i11v i11v deleted the feat/spec-test-coverage branch January 23, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants