tractatus/tests/integration
TheFlow 42f0bc7d8c test: add comprehensive coverage for governance and markdown utilities
Coverage Improvements (Task 3 - Week 1):
- governance.routes.js: 31.81% → 100% (+68.19%)
- markdown.util.js: 17.39% → 89.13% (+71.74%)

New Test Files:
- tests/integration/api.governance.test.js (33 tests)
  - Authentication/authorization for all 6 governance endpoints
  - Request validation (missing fields, invalid input)
  - Admin-only access control enforcement
  - Framework component testing (classify, validate, enforce, pressure, verify)

- tests/unit/markdown.util.test.js (60 tests)
  - markdownToHtml: conversion, syntax highlighting, XSS sanitization (23 tests)
  - extractTOC: heading extraction and slug generation (11 tests)
  - extractFrontMatter: YAML front matter parsing (10 tests)
  - generateSlug: URL-safe slug generation (16 tests)

This completes Week 1, Task 3: Increase test coverage on critical services.
Previous tasks in same session:
- Task 1: Fixed 29 production test failures ✓
- Task 2: Completed Koha security implementation ✓

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 21:32:13 +13:00
..
api.admin.test.js fix: resolve all 29 production test failures 2025-10-09 20:58:37 +13:00
api.auth.test.js fix: resolve all 29 production test failures 2025-10-09 20:58:37 +13:00
api.documents.test.js fix: resolve all 29 production test failures 2025-10-09 20:58:37 +13:00
api.governance.test.js test: add comprehensive coverage for governance and markdown utilities 2025-10-09 21:32:13 +13:00
api.health.test.js fix: resolve all 29 production test failures 2025-10-09 20:58:37 +13:00
api.koha.test.js security: complete Koha authentication and security hardening 2025-10-09 21:10:29 +13:00