jattac.libs.web.zest-button 1.2.9 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,275 @@
1
+ # Testing Policy
2
+
3
+ This repository uses strict Test Driven Development.
4
+
5
+ No exceptions.
6
+
7
+ ---
8
+
9
+ # Fundamental Rule
10
+
11
+ Production code MUST NOT be written before a failing test exists.
12
+
13
+ ---
14
+
15
+ # Required Cycle
16
+
17
+ Write failing test
18
+
19
+ ↓
20
+
21
+ Observe failure
22
+
23
+ ↓
24
+
25
+ Write minimal production code
26
+
27
+ ↓
28
+
29
+ Observe success
30
+
31
+ ↓
32
+
33
+ Refactor
34
+
35
+ ---
36
+
37
+ # Bug Fixes
38
+
39
+ Every bug MUST begin with a regression test.
40
+
41
+ Never fix a bug first.
42
+
43
+ Incorrect:
44
+
45
+ Fix bug
46
+
47
+ ↓
48
+
49
+ Write test
50
+
51
+ Correct:
52
+
53
+ Write failing regression test
54
+
55
+ ↓
56
+
57
+ Observe failure
58
+
59
+ ↓
60
+
61
+ Implement fix
62
+
63
+ ↓
64
+
65
+ Observe pass
66
+
67
+ ---
68
+
69
+ # Existing Behaviour
70
+
71
+ Before modifying existing code:
72
+
73
+ Identify all affected behaviour.
74
+
75
+ If behaviour is not covered by tests:
76
+
77
+ Write those tests first.
78
+
79
+ The objective is to freeze current business behaviour.
80
+
81
+ Only then modify production code.
82
+
83
+ ---
84
+
85
+ # Missing Tests
86
+
87
+ Missing tests are technical debt.
88
+
89
+ If encountered during implementation they SHOULD be added before production changes.
90
+
91
+ ---
92
+
93
+ # Green Tests
94
+
95
+ Code SHALL NEVER be committed while tests are failing unless explicitly instructed.
96
+
97
+ ---
98
+
99
+ # Refactoring
100
+
101
+ Refactoring SHALL NOT alter externally observable behaviour.
102
+
103
+ Tests SHALL remain green before, during and after refactoring.
104
+
105
+ ---
106
+
107
+ # Coverage
108
+
109
+ Coverage percentage is NOT success.
110
+
111
+ Correct behavioural coverage is success.
112
+
113
+ Prefer meaningful behavioural tests over line coverage.
114
+
115
+ ---
116
+
117
+ # Coverage Regression
118
+
119
+ Coverage MUST NOT decrease from the previous build.
120
+
121
+ If current coverage is lower than the baseline, the build FAILS.
122
+
123
+ This is not about hitting a target number.
124
+
125
+ This is about preventing regressions.
126
+
127
+ The baseline is tracked in test-reports/coverage-baseline.json.
128
+
129
+ See AI_TEST_CONFIGURATION.md for baseline management details.
130
+
131
+ ---
132
+
133
+ # Purpose of Tests
134
+
135
+ Tests are written to verify functionality and catch bugs.
136
+
137
+ Tests are NOT written to hit coverage goals.
138
+
139
+ High coverage with poor tests is worse than lower coverage with meaningful tests.
140
+
141
+ Every test MUST verify a specific behaviour.
142
+
143
+ Every test MUST assert specific expected values.
144
+
145
+ Coverage is a side effect of good testing, not the goal.
146
+
147
+ ---
148
+
149
+ # Test Reporting Configuration
150
+
151
+ Every project MUST have test reporting configured.
152
+
153
+ The LLM MUST verify configuration at the start of every session.
154
+
155
+ If reporting is not configured, the FIRST task is to configure it.
156
+
157
+ See AI_TEST_CONFIGURATION.md for platform-specific instructions.
158
+
159
+ ---
160
+
161
+ # Test Output Verification
162
+
163
+ When tests are run, you MUST capture and report the actual output.
164
+
165
+ State:
166
+
167
+ • Command run
168
+
169
+ • Tests passed
170
+
171
+ • Tests failed
172
+
173
+ • Tests skipped
174
+
175
+ Do NOT summarise.
176
+
177
+ Do NOT paraphrase.
178
+
179
+ Show the numbers.
180
+
181
+ Example:
182
+
183
+ ```
184
+ $ dotnet test
185
+
186
+ Passed: 47
187
+ Failed: 0
188
+ Skipped: 2
189
+
190
+ Total: 49
191
+ ```
192
+
193
+ Do NOT claim tests pass without showing output.
194
+
195
+ ---
196
+
197
+ # Failure Handling
198
+
199
+ If ANY test fails, the task is NOT complete.
200
+
201
+ Fix the failure before proceeding.
202
+
203
+ Do NOT skip tests.
204
+
205
+ Do NOT disable tests.
206
+
207
+ Do NOT mark tests as ignored.
208
+
209
+ Do NOT modify tests to make them pass.
210
+
211
+ Do NOT change test expectations to match broken behaviour.
212
+
213
+ ---
214
+
215
+ # Test Isolation
216
+
217
+ New tests MUST NOT depend on test execution order.
218
+
219
+ New tests MUST NOT depend on external state (databases, file systems, network) unless testing integration behaviour explicitly.
220
+
221
+ New tests MUST clean up after themselves.
222
+
223
+ New tests MUST NOT modify shared state that could affect other tests.
224
+
225
+ ---
226
+
227
+ # Assertion Specificity
228
+
229
+ Tests MUST assert specific expected values, not just "does not throw."
230
+
231
+ Tests MUST verify behaviour, not implementation details.
232
+
233
+ Tests SHOULD use Arrange-Act-Assert structure.
234
+
235
+ Tests SHOULD have descriptive names that explain the scenario.
236
+
237
+ ---
238
+
239
+ # Test Categories
240
+
241
+ The following test categories exist and MUST be executed in order:
242
+
243
+ 1. Unit tests
244
+
245
+ 2. Service tests
246
+
247
+ 3. API integration tests
248
+
249
+ 4. API contract tests
250
+
251
+ 5. UI end-to-end tests
252
+
253
+ All categories MUST pass before a task is considered complete.
254
+
255
+ If a test category does not exist in the project, skip it but document its absence.
256
+
257
+ ---
258
+
259
+ # Mock and Stub Rules
260
+
261
+ Mocks and stubs MUST NOT be used to hide failures.
262
+
263
+ Mocks and stubs MUST represent real behaviour accurately.
264
+
265
+ If a mock is causing confusion, write an integration test instead.
266
+
267
+ ---
268
+
269
+ # Regression Tests
270
+
271
+ Every bug fix MUST include a regression test.
272
+
273
+ Regression tests MUST be named to describe the bug they prevent.
274
+
275
+ Regression tests MUST remain in the test suite permanently.