서우 AgentOffice
← 라이브러리
development

테스트 패턴

원문: testing-patterns

Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.

무엇을 하나요

Testing Patterns and Utilities Testing Philosophy Test Driven Development (TDD): Write failing test FIRST Implement minimal code to pass Refactor after green Never write production code without a failing test Behavior Driven Testing: Test behavior, not implementation Focus on public APIs and business requirements Avoid testing implementation details Use descriptive test names that describe behavior Factory Pattern: Create getMockX(overrides?: Partial<X ) functions Provide sensible defaults Allow overriding specific properties Keep tests DRY and maintainable Test Utilities Custom Render Function Create a custom render that wraps components with required providers: Usage: Factory Pattern Compo

실행 시 본인 API 키(BYOK)로 동작하며, 모델 비용은 사용자 계정에서 직접 결제됩니다.