docfast/src/__tests__
OpenClaw Subagent b58695bdb8 fix: remove contradictory vi.unmock breaking recover DB fallback tests
The test file had both vi.unmock and vi.mock for the same module.
vi.unmock takes precedence in Vitest, so getAllKeys was the real
function instead of a mock, causing mockReturnValueOnce to fail.
2026-03-19 11:07:22 +01:00
..
admin-integration.test.ts test: add integration tests for admin.ts and pages.ts routes 2026-03-12 17:10:05 +01:00
admin-routes.test.ts type safety: complete catch(err:unknown) migration + extract admin routes 2026-03-09 14:09:12 +01:00
api.test.ts Fix OpenAPI PdfOptions schema: add missing format values, waitUntil field, and template size limits 2026-03-04 11:09:19 +01:00
app-routes.test.ts fix: swagger apis path to src/ + update stale signup/verify test refs 2026-03-18 20:11:17 +01:00
auth.test.ts test: add auth, rate-limit, and keys service tests 2026-02-26 10:03:31 +00:00
billing-branch-coverage.test.ts test: improve billing.ts and demo.ts branch coverage 2026-03-14 17:13:36 +01:00
billing-templates.test.ts refactor: extract billing HTML templates into billing-templates.ts (TDD) 2026-03-10 17:03:44 +01:00
billing.test.ts chore: upgrade vitest 3.2.4 → 4.0.18 2026-03-12 11:21:03 +01:00
body-limits.test.ts feat: add PDF render timing to convert and demo routes 2026-03-06 11:08:06 +01:00
browser-coverage.test.ts test: add HTTP rewrite and block-other-host SSRF branch tests for browser.ts 2026-03-15 11:13:49 +01:00
browser-pool.test.ts fix: clear PDF_TIMEOUT timers after successful render, fix test unhandled rejections 2026-03-06 17:06:41 +01:00
browser-recycle.test.ts fix: clean up request interceptor in recyclePage to prevent pool contamination 2026-03-02 17:05:45 +01:00
catch-type-safety.test.ts type safety: complete catch(err:unknown) migration + extract admin routes 2026-03-09 14:09:12 +01:00
cleanup-no-verifications-table.test.ts Remove dead signup router, unused verification functions, and legacy cleanup query 2026-03-08 14:07:50 +01:00
convert-sanitized.test.ts fix: resolve all TypeScript strict-mode errors in test files 2026-03-09 17:12:22 +01:00
convert.test.ts fix: prevent error message information disclosure + standardize error handling (TDD) 2026-03-07 17:05:54 +01:00
cors-staging.test.ts fix(cors): dynamic origin for staging support (BUG-111) + eliminate all 'as any' casts 2026-03-09 08:08:37 +01:00
db-init-cleanup.test.ts test: improve db.ts and keys.ts coverage 2026-03-12 20:08:23 +01:00
db-utils.test.ts refactor: eliminate all catch(err: any) with proper unknown typing + type email transport 2026-03-09 11:10:58 +01:00
db.test.ts chore: upgrade vitest 3.2.4 → 4.0.18 2026-03-12 11:21:03 +01:00
dead-signup-removal.test.ts Remove dead signup router, unused verification functions, and legacy cleanup query 2026-03-08 14:07:50 +01:00
dead-token-verification-removal.test.ts Remove dead signup router, unused verification functions, and legacy cleanup query 2026-03-08 14:07:50 +01:00
demo-branch-coverage.test.ts test: improve billing.ts and demo.ts branch coverage 2026-03-14 17:13:36 +01:00
demo.test.ts refactor(demo): Use handlePdfRoute to reduce boilerplate 2026-03-10 11:06:34 +01:00
dockerfile-build.test.ts Optimize Dockerfile with multi-stage build 2026-03-08 11:05:59 +01:00
email-change.test.ts fix: add global error handler + try/catch in recover & email-change routes (BUG-112) 2026-03-17 17:10:36 +01:00
email.test.ts add verification service and email service tests (13 new tests) 2026-02-26 07:04:39 +00:00
error-handler.test.ts fix: add global error handler + try/catch in recover & email-change routes (BUG-112) 2026-03-17 17:10:36 +01:00
error-responses.test.ts fix: resolve all TypeScript strict-mode errors in test files 2026-03-09 17:12:22 +01:00
error-type-safety.test.ts refactor: eliminate all catch(err: any) with proper unknown typing + type email transport 2026-03-09 11:10:58 +01:00
errors.test.ts refactor: eliminate all catch(err: any) with proper unknown typing + type email transport 2026-03-09 11:10:58 +01:00
examples-http-only.test.ts fix: replace stale Free Tier with Demo tier in Terms of Service 2026-03-05 14:05:34 +01:00
examples-url-to-pdf.test.ts feat: add URL-to-PDF examples to examples page 2026-03-05 17:03:23 +01:00
express5-migration.test.ts Migrate from Express 4 to Express 5 2026-03-11 17:08:07 +01:00
health.test.ts test: improve health.ts and browser.ts coverage 2026-03-15 08:06:39 +01:00
html-utils.test.ts feat: unit tests for security/utility functions (isPrivateIP, isTransientError, markdown, escapeHtml) 2026-02-25 19:04:59 +00:00
html.test.ts fix: add .js extension to html test import (TypeScript moduleResolution) 2026-03-01 11:05:08 +01:00
keys-branch-coverage.test.ts test: improve branch coverage for billing.ts and keys.ts 2026-03-14 11:09:01 +01:00
keys-cache-hit.test.ts test: improve keys.ts branch coverage — cache-hit paths for createProKey, downgradeByCustomer, findKeyByCustomerId 2026-03-14 14:18:50 +01:00
keys-coverage.test.ts test: improve keys.ts coverage — cache-hit paths for createFreeKey, updateKeyEmail, updateEmailByCustomer 2026-03-13 17:10:13 +01:00
keys-db-fallback-helper.test.ts refactor: extract findKeyInCacheOrDb to DRY up DB fallback pattern (TDD) 2026-03-10 14:06:44 +01:00
keys-downgrade.test.ts fix(BUG-106): DB fallback for downgradeByCustomer and recover route 2026-03-06 20:06:04 +01:00
keys-email-update.test.ts fix(keys): add DB fallback to updateEmailByCustomer, updateKeyEmail, and recover route (BUG-108, BUG-109, BUG-110) 2026-03-07 20:06:13 +01:00
keys.test.ts test: add auth, rate-limit, and keys service tests 2026-02-26 10:03:31 +00:00
markdown-lists.test.ts chore: upgrade marked 15→17 (ReDoS fix, list rendering improvements) 2026-03-11 08:07:05 +01:00
markdown.test.ts feat: unit tests for security/utility functions (isPrivateIP, isTransientError, markdown, escapeHtml) 2026-02-25 19:04:59 +00:00
network.test.ts feat: unit tests for security/utility functions (isPrivateIP, isTransientError, markdown, escapeHtml) 2026-02-25 19:04:59 +00:00
not-found-handler.test.ts test: add 404 handler coverage for index.ts 2026-03-13 08:05:41 +01:00
openapi-spec.test.ts fix: swagger apis path to src/ + update stale signup/verify test refs 2026-03-18 20:11:17 +01:00
pages-integration.test.ts test: add integration tests for admin.ts and pages.ts routes 2026-03-12 17:10:05 +01:00
pages-router.test.ts refactor: extract static page routes into routes/pages.ts (TDD) 2026-03-10 08:04:22 +01:00
pdf-handler.test.ts refactor: extract shared PDF route handler to eliminate convert route duplication 2026-03-09 20:07:27 +01:00
pdf-options-builder.test.ts test: improve health.ts and browser.ts coverage 2026-03-15 08:06:39 +01:00
pdf-options.test.ts Add input validation for waitUntil and size limits for headerTemplate/footerTemplate 2026-03-04 11:04:46 +01:00
pdfRateLimit-coverage.test.ts feat(tests): improve pdfRateLimit middleware test coverage 2026-03-14 08:12:20 +01:00
pdfRateLimit.test.ts test: add auth, rate-limit, and keys service tests 2026-02-26 10:03:31 +00:00
periodic-cleanup.test.ts feat: add periodic database cleanup every 6 hours (TDD) 2026-03-11 11:06:09 +01:00
rate-limit-v8.test.ts chore: upgrade express-rate-limit 7.5.1 → 8.3.1 (IPv6 security fix) 2026-03-11 20:06:44 +01:00
recover-coverage.test.ts chore: bump puppeteer, improve recover.ts coverage 2026-03-13 14:08:44 +01:00
recover-db-fallback.test.ts fix: remove contradictory vi.unmock breaking recover DB fallback tests 2026-03-19 11:07:22 +01:00
recover-initial-db-fallback.test.ts fix: resolve all TypeScript strict-mode errors in test files 2026-03-09 17:12:22 +01:00
recover.test.ts fix: add global error handler + try/catch in recover & email-change routes (BUG-112) 2026-03-17 17:10:36 +01:00
render-timing.test.ts fix: resolve all TypeScript strict-mode errors in test files 2026-03-09 17:12:22 +01:00
sanitize.test.ts fix: sanitize path traversal in filename (TDD) 2026-03-18 17:03:56 +01:00
setup.ts refactor: extract buildPdfOptions to DRY up renderPdf/renderUrlPdf (TDD) 2026-03-10 14:04:19 +01:00
staging-noindex.test.ts fix: add X-Robots-Tag noindex for staging, remove dead comment (TDD) 2026-03-08 17:03:37 +01:00
templates-render-validation.test.ts feat: add PDF render timing to convert and demo routes 2026-03-06 11:08:06 +01:00
templates-route.test.ts feat: add PDF render timing to convert and demo routes 2026-03-06 11:08:06 +01:00
templates.test.ts fix: remove unnecessary 'as any' casts and add proper types to templates 2026-03-19 08:12:30 +01:00
terms-content.test.ts fix: replace stale Free Tier with Demo tier in Terms of Service (BUG-104) 2026-03-05 14:11:00 +01:00
type-safety.test.ts fix: remove unnecessary 'as any' casts and add proper types to templates 2026-03-19 08:12:30 +01:00
usage-coverage.test.ts test: improve usage.ts coverage (getUsageForKey, retry exhaustion) 2026-03-13 08:06:46 +01:00
usage-flush.test.ts fix: resolve all TypeScript strict-mode errors in test files 2026-03-09 17:12:22 +01:00
usage-free-tier-message.test.ts Remove dead signup router, unused verification functions, and legacy cleanup query 2026-03-08 14:07:50 +01:00
usage-me.test.ts feat: add GET /v1/usage/me endpoint for user-facing usage stats 2026-03-07 08:04:50 +01:00
usage-shutdown.test.ts fix: await flushDirtyEntries during shutdown to prevent usage data loss 2026-03-07 08:03:56 +01:00
usage.test.ts Remove dead signup router, unused verification functions, and legacy cleanup query 2026-03-08 14:07:50 +01:00
verification.test.ts add verification service and email service tests (13 new tests) 2026-02-26 07:04:39 +00:00