test: add full test coverage for notes, ues, ue-modules, ajustements, enseignements, users
- Unit tests (mock DB + API) for all missing endpoints - Integration tests (Drizzle direct) for all missing entities - E2E tests (handler + real DB) for all missing endpoints - Robustness tests: invalid inputs, SQL injection, type errors, business rule violations - Seed helpers: seedNotes, seedUeModules, seedEnseignements, seedAjustements - Add test:coverage and test:coverage:html tasks to deno.json Tests expose known handler bugs (marked [BUG] in test names): - ajustements PUT/DELETE: .where() without and() modifies all rows for student - Missing try/catch in modules, users, enseignements handlers - Whitespace accepted as valid string values - No type or business rule validation (note bounds, coeff >= 0)
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
"test:unit": "deno test -A --no-check tests/unit/",
|
||||
"test:integration": "deno test -A --no-check tests/integration/",
|
||||
"test:e2e": "deno test -A --no-check tests/e2e/",
|
||||
"test:coverage": "deno test -A --no-check --coverage=coverage tests/ && deno coverage coverage --exclude=tests/",
|
||||
"test:coverage:html": "deno test -A --no-check --coverage=coverage tests/ && deno coverage coverage --exclude=tests/ --html",
|
||||
"migrate": "node_modules/.bin/drizzle-kit migrate"
|
||||
},
|
||||
"lint": {
|
||||
|
||||
Reference in New Issue
Block a user