@@ -52,15 +52,7 @@ if (PatternMatchers.isFraction(matched)) {
52
52
}
53
53
```
54
54
55
- 3 . ** Add test cases to ` test/typography.test.ts ` :**
56
- ``` typescript
57
- describe (' Fractions' , () => {
58
- it (' should match fraction patterns' , () => {
59
- const pattern = / \b (\d + )\/ (\d + )\b / g
60
- expect (' 1/2 cup' .match (pattern )).toEqual ([' 1/2' ])
61
- })
62
- })
63
- ```
55
+ 3 . ** Add test cases** - See [ Writing Tests Guide] ( ./testing/writing-tests.md ) for patterns and examples
64
56
65
57
4 . ** Update playground example:**
66
58
``` vue
@@ -91,51 +83,15 @@ fractions: {
91
83
92
84
3 . ** Document in README.md**
93
85
94
- ## ✅ Testing Guidelines
95
-
96
- ### Running Tests
97
- ``` bash
98
- # Run all tests
99
- pnpm test
86
+ ## ✅ Testing
100
87
101
- # Run specific test file
102
- pnpm test test/typography.test.ts
88
+ We maintain ** 227+ tests** across unit, integration, E2E, and performance categories.
103
89
104
- # Watch mode
105
- pnpm test:watch
106
- ```
107
-
108
- ### Writing Tests
109
-
110
- Tests should cover:
111
- 1 . ** Pattern matching** - Does the regex work?
112
- 2 . ** Text processing** - Is the output correct?
113
- 3 . ** Edge cases** - Empty strings, special characters
114
- 4 . ** Performance** - Large text blocks
115
-
116
- Example test structure:
117
- ``` typescript
118
- describe (' Feature Name' , () => {
119
- // Test pattern matching
120
- it (' should match expected patterns' , () => {
121
- const pattern = / your-pattern/ g
122
- expect (' test input' .match (pattern )).toEqual ([' expected' ])
123
- })
124
-
125
- // Test processing
126
- it (' should transform correctly' , () => {
127
- const result = processMatch (' input' )
128
- expect (result .parts ).toEqual ([
129
- { type: ' super' , content: ' expected' }
130
- ])
131
- })
132
-
133
- // Test edge cases
134
- it (' should handle edge cases' , () => {
135
- expect (processMatch (' ' )).toEqual ({ modified: false , parts: [] })
136
- })
137
- })
138
- ```
90
+ ** 📚 See [ Testing Documentation] ( ./testing/index.md ) ** for:
91
+ - Running tests
92
+ - Writing new tests
93
+ - Test patterns and examples
94
+ - CI/CD integration
139
95
140
96
## 📋 Pull Request Process
141
97
@@ -144,8 +100,8 @@ describe('Feature Name', () => {
144
100
1 . ** Fork & Clone** the repository
145
101
2 . ** Create a feature branch:** ` git checkout -b feature/your-feature `
146
102
3 . ** Make your changes**
147
- 4 . ** Add/update tests** - All new features need tests
148
- 5 . ** Run tests:** ` pnpm test ` - Must pass
103
+ 4 . ** Add/update tests** - See [ Writing Tests Guide ] ( ./testing/writing- tests.md )
104
+ 5 . ** Run tests:** ` pnpm test ` - All 227+ tests must pass
149
105
6 . ** Run linter:** ` pnpm lint ` - Must pass
150
106
7 . ** Test in playground:** ` pnpm dev ` - Verify visually
151
107
8 . ** Update documentation** if needed
@@ -172,9 +128,9 @@ Brief description of changes
172
128
- [ ] Performance improvement
173
129
174
130
## Testing
175
- - [ ] Tests pass locally
176
- - [ ] Added new tests
177
- - [ ] Tested in playground
131
+ - [ ] All tests pass (`pnpm test`)
132
+ - [ ] Added new tests (see [Writing Tests Guide](./testing/writing-tests.md))
133
+ - [ ] Tested in playground (`pnpm dev`)
178
134
179
135
## Screenshots (if applicable)
180
136
Before/after screenshots for visual changes
0 commit comments