Testing Guidelines / 测试指南
This document provides comprehensive testing guidelines for the Tego project, covering unit tests, integration tests, and E2E tests.
本文档提供 Tego 项目的全面测试指南,涵盖单元测试、集成测试和 E2E 测试。
## Quick Navigation
1.1k12mo agoReviewMountCreate a free account to mount
smaller, reusable pieces. Keep components focused on a single responsibility
- Follow Expo's official documentation for setting up and configuring your projects: https://docs.expo.dev/
### Naming Conventions
- Use lowercase with dashes
Steady3 mentions in 2 weeks
No other project uses it yet
1.1k17mo agoReviewMountCreate a free account to mount
alwaysApply: true
---
Prefer clarity, consistency, and contributor friendliness.
Keep naming, structure, setup, and documentation easy for newcomers to understand.
When changing public-facing text or contributor guidance, keep it clear
1k6mo agoReviewMountCreate a free account to mount
When code changes affect usage, setup, behavior, operations, or developer workflow, update the relevant documentation.
## Update docs when changes affect
- setup or installation
- configuration or environment variables
- API behavior
- command
1k6mo agoReviewMountCreate a free account to mount
Internal workflow notes
- Text inside diagrams, charts, screenshots, and images produced for code or documentation
2. Use Chinese only when interacting with me in the following cases
- You need
1k6mo agoReviewMountCreate a free account to mount
break compatibility when necessary.
If required:
- minimize the blast radius
- update all known dependents
- document the change clearly
- note any manual migration steps
- avoid partial migration states that are hard
1k6mo agoReviewMountCreate a free account to mount
true
---
Work as if the repository is maintained in public.
Keep changes understandable, testable, documented, and easy for contributors to follow.
Do not rely on hidden local knowledge or conversation
1k6mo agoReviewMountCreate a free account to mount
focused, avoid unrelated churn, and optimize for reviewer clarity.
Include relevant validation, tests, and documentation updates when behavior changes.
Prefer small, easy-to-review change sets over large mixed diffs
1k6mo agoReviewMountCreate a free account to mount
redacted
## Environment safety rules
- treat `.env` and similar files as sensitive
- prefer `.env.example` or documented placeholders for required configuration
- when adding a new environment variable, also update the example
1k6mo agoReviewMountCreate a free account to mount
risky, or unrelated tools.
When installing something new:
- keep the change intentional and minimal
- document it if it affects setup, workflow, or contributor experience
- update relevant config or docs when
1k6mo agoReviewMountCreate a free account to mount
diagnose future regressions quickly
## If a test cannot be added immediately
Then still:
- document the failure mode clearly in your reasoning
- validate the fix using the strongest available check
1k6mo agoReviewMountCreate a free account to mount
description:
globs: *.tsx
alwaysApply: false
---
## Typescript Development Guidelines:
### Documentation
- Add TSDoc style documentation when writing functions, methods and components.
### Single Responsibility
- SRP is a core principle of our codebase
Steady4 mentions in 2 weeks
No other project uses it yet
1k11mo agoReviewMountCreate a free account to mount