Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 17:55:11 +08:00
commit f9707d7bd8
16 changed files with 3770 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
# [directory-name]/
<!-- Replace [directory-name] with the actual directory name -->
This directory contains [brief description of what this directory contains].
## Overview
<!-- 2-3 sentences explaining the purpose and scope -->
## Directory Structure
<!-- If the directory has subdirectories, show them here -->
```
[directory-name]/
├── subdirectory1/ # Description
├── subdirectory2/ # Description
└── file.ext # Description
```
## Key Files
<!-- Highlight the most important files and their roles -->
- **file1.ext**: Description of what this file does
- **file2.ext**: Description of what this file does
## Important Patterns
<!-- Document conventions, patterns, or standards used -->
### Pattern Name
Description and example of the pattern.
## Dependencies
### Internal Dependencies
<!-- What this code depends on from elsewhere in the codebase -->
- `src/path/to/dependency` - Description
### External Dependencies
<!-- Third-party libraries or services -->
- Package Name - Purpose
### Used By
<!-- What other parts of the codebase depend on this -->
- `src/path/to/dependent` - How it uses this code
## Usage
<!-- How to work with this code, with examples -->
Example usage:
```typescript
// Code example
```
## Testing
<!-- How to test this code -->
```bash
npm run test:this-area
```
## Notes
<!-- Any gotchas, known issues, or additional context -->
- Important note 1
- Important note 2
---
*Last Updated: YYYY-MM-DD*

View File

@@ -0,0 +1,105 @@
# tests/[test-type]/
<!-- Replace [test-type] with: unit, integration, e2e, etc. -->
This directory contains [test type] tests for [what is being tested].
## Overview
<!-- Explain what these tests cover and their purpose -->
## Test Structure
```
[test-type]/
├── subdirectory1/ # Tests for X
├── subdirectory2/ # Tests for Y
└── helpers/ # Test utilities and fixtures
```
## Running Tests
```bash
# All tests in this directory
npm run test:[test-type]
# Specific test file
npm run test:[test-type] -- path/to/test.test.ts
# Watch mode
npm run test:[test-type]:watch
```
## Test Environment
<!-- Describe the test environment setup -->
These tests use:
- **Database**: [Description]
- **External Services**: [How mocked/handled]
- **Test Data**: [Where fixtures are located]
## Patterns
### Test Structure
<!-- Show the typical test structure -->
```typescript
describe('Feature Name', () => {
beforeEach(() => {
// Setup
});
afterEach(() => {
// Cleanup
});
it('should do something', () => {
// Arrange
// Act
// Assert
});
});
```
### Fixtures and Factories
<!-- How to use test data -->
```typescript
import { fixtures } from './fixtures';
const user = fixtures.user();
const admin = fixtures.user({ role: 'admin' });
```
## Common Patterns
<!-- Document common testing patterns used -->
- Pattern 1: Description
- Pattern 2: Description
## Troubleshooting
<!-- Common issues and solutions -->
### Issue 1
Problem description and solution.
### Issue 2
Problem description and solution.
## Notes
<!-- Additional context -->
- Important note about test conventions
- Known limitations
---
*Last Updated: YYYY-MM-DD*