3 Commits

Author SHA1 Message Date
ffc6dac172 feat: frontend tests — import/export validator + unit tests + CI integration
All checks were successful
CI / lint (push) Successful in 14s
CI / security (push) Successful in 11s
CI / test (push) Successful in 17s
CI / build (push) Successful in 2s
- tests/frontend/validate-imports.mjs: 0 errors on 13 modules, 79 exports
  Detects: missing exports, broken imports, const reassignments
- tests/frontend/unit.test.mjs: escapeHtml, state object, module syntax
- Added to CI lint job (runs after Ruff + Mypy)
2026-05-28 18:46:10 -04:00
8d1b766947 test: expand coverage to 49% (+78 new tests, 175 total)
Add 78 new tests targeting high-impact uncovered modules:
- tests/test_search_advanced.py (23 tests): InvertedIndex CRUD,
  search/advanced_search/suggest functions, tag/title indexing
- tests/test_indexer_advanced.py (15 tests): hooks, file CRUD,
  path index, lookup, generation counter
- tests/test_modules.py (40 tests): audit, history, rate limit,
  saved searches, vault settings, webhooks, share

Coverage improvements:
  ratelimit.py:  80% → 100%
  share.py:      24% →  97%
  saved_searches: 37% →  95%
  history.py:    26% →  86%
  audit.py:       0% →  85%
  search.py:     44% →  82%
  webhooks.py:   31% →  67%
  vault_settings: 31% →  69%
  indexer.py:    47% →  65%
  Overall:       35% →  49%
2026-05-27 22:32:10 -04:00
edb9e98f81 test: add pytest suite - 97 tests, search + indexer + auth
Create comprehensive test suite with 97 passing tests:
- tests/conftest.py: fixtures (TestClient, temp vault dirs, index setup)
- tests/test_search.py (27 tests): tokenizer, snippets, highlight,
  tag filter, search API, advanced search, suggest, tags API
- tests/test_indexer.py (32 tests): frontmatter parsing, inline tags,
  title extraction, scan_vault, find_file_in_index, backlinks
- tests/test_auth.py (38 tests): password hashing, JWT create/decode,
  token revocation, user CRUD, login lockout, rate limiting, middleware

Also fix: lazy WeasyPrint import (graceful fallback when GTK missing),
add data/ to .gitignore (runtime files from test runs).
2026-05-27 22:06:27 -04:00