writing-tests

Installation
SKILL.md

Writing Tests

Core Principles

When writing tests:

  1. Use Jest with describe/it blocks
  2. Use Effect-TS for async operations (not async/await)
  3. Test both valid and invalid cases
  4. Add debugging to production code using Effect.logDebug in the code being tested
  5. Add debugging to test code using console.log in tests
  6. Enable console logging while debugging - Use enableConsoleLogging() and setLogLevel('debug') in beforeEach, then change to setLogLevel('error') when tests are ready
  7. Prefer real implementations over mocks - Use real services, managers, and components unless mocking is absolutely necessary

Test Structure

Basic Test Template

Installs
1
GitHub Stars
11
First Seen
11 days ago
writing-tests — forcedotcom/apex-language-support