Source modules in src/ that have no test file. Counted by checking which .ts files under src/ are imported by *.test.ts (or have a colocated *.test.ts). 27 test files cover roughly half the source surface.

Warning

This list is not “lines of uncovered code” — it is a list of modules with no automated test of any kind. A red entry means a regression in that file will not be caught by CI.

Pipeline workers — entirely untested

FileWhy it matters
src/queues/workers.tsDefines the three BullMQ workers Scrape/Enrich/Update. The reklamspärr P0 gap in Pipeline lives here.
src/queues/scheduled-jobs.tsCron-style scheduled enqueueing.
src/workers/enrichWorker.tsThe actual enrichment worker process — the one that runs Playwright inline (P1 in Known Issues).
src/workers/enrichDispatcher.tsRoutes enrich jobs.
src/workers/playwrightWorker.tsPlaywright pool — the proposed decoupling target.
src/workers/updateWorker.tsPersistence worker. src/integration.test.ts tests a parallel reimplementation of its handler, not this file.
src/workers/art14Worker.tsArticle 14 notification worker.

Compliance — partial

FileStatus
src/compliance/reklamsparre.tsNo test. This is the SCB advertising-block check. The P0 gap noted in Pipeline (worker does not call isScbAdvertisingBlocked()) is invisible to CI because neither the call site nor the function has a test.
src/scraping/middleware.tsPartial — isOptedOut covered by src/integration.test.ts. Other exports (if any) untested.

Enrichment sources — partial

Tested:

  • src/enrichment/sources/crawlee.ts — extraction helpers (tests/enrichment/crawlee-quality.test.ts)
  • src/enrichment/sources/firecrawl.ts — extensively (tests/enrichment/firecrawl.test.ts)
  • src/enrichment/sources/domain.ts — partial (tests/domainDiscovery.test.ts — 2 negative assertions only)
  • src/enrichment/sources/registry.ts — partial (tests/speed.test.ts — latency only)
  • src/enrichment/pipeline.ts — partial (live integration test in tests/enrichment/board-members-integration.test.ts)

Untested:

  • src/enrichment/sources/serper.ts — Serper.dev API client
  • src/enrichment/sources/maps.ts — Google Places fallback (see Google Places)
  • src/enrichment/sources/linkedin.ts
  • src/enrichment/sources/hunter.ts — Hunter.io email enrichment
  • src/enrichment/sources/website.ts — direct site scraper used by Crawlee Scraper
  • src/enrichment/sources/newsJobs.ts
  • src/enrichment/ecoApiIntegration.ts
  • src/enrichment/config.ts — only blocklist-membership tested (regression guard)

Processors are well-covered by tests/enrichment/processors.test.ts and src/enrichmentEngine.v7.test.ts — but those two files duplicate ~40% of their cases.

Validation layers — untested

FileStatus
src/validation/layers/registryLayer.tsNo test. The Layer 1 of the Lead Scoring rubric.
src/validation/layers/newsLayer.tsNo test. Layer 4.
src/validationEngine.tsSmoke only (src/validationEngine.test.ts — 2 tests).

Lib / infra — mostly untested

FileStatus
src/lib/validation.tsTested (src/lib/validation.test.ts)
src/lib/article14Notification.tsTested (in src/enrichmentEngine.v7.test.ts)
src/lib/redis.tsNo test
src/lib/redisClients.tsNo test
src/lib/keycloak.tsNo test (security tests only document env-var requirements)
src/lib/embeddings.tsNo test (1536-dim shape assumed in tests/api/documents.test.ts)
src/lib/smtpEmailValidator.tsNo test
src/lib/webhooks.tsNo test
src/lib/apiTokenCounter.tsNo test

Imports — untested

src/import/* (bulk ingest entry points): no tests at all.

File
src/import/scb-import.ts — TSV stream ingest
src/import/bolagsverket-import.ts — bulk ingest of ~1.8M companies
src/import/copy-import.ts
src/import/delta-import.ts
src/import/merge-sources.ts
src/import/parser.ts — org-nr parsing utilities
src/import/validate-merge.ts
src/import/index.ts

src/fetchers/news/real-api.ts and src/fetchers/bolagsverket/openApi.ts (the working VärdefullaDatamängder gateway, see project memory project_bv_api.md) are untested.

src/fetchers/scb/rate-limiter.ts is untested.

API — partial

FileStatus
src/api/index.tsHit through every API integration test (server entry)
src/api/auth.tsTested — tests/api/auth.test.ts + tests/api/security.test.ts
src/api/companies.ts, leads.ts, projects.ts, organizations.ts, users.ts, documents.ts, search.tsTested via integration
src/api/kundkort.tsTested (tests/api/kundkort-enrich.test.ts) — 1 endpoint
src/api/scrape.tsNo test
src/api/export.tsPartial — only sanitizeCSVValue tested (tests/api/security.test.ts)
src/api/validation.tsPartial — validateCompany, validateLead, validateValidationResult tested via tests/api/structure.test.ts
src/api/enrichmentErrors.tsNo test
src/api/middleware/auth.tsIndirectly via 401 assertions; no unit
src/api/middleware/rate-limit.tsSmoke only — header-presence assertion

Top-level orphans

FileStatus
src/index.tsNo test (BullMQ pipeline entrypoint)
src/cache.tsNo test
src/contactPositionMapper.tsNo test
src/emailDiscovery.tsNo test
src/eniroIntegration.ts, src/eniroScraper.tsNo test
src/googleMapsScraper.tsNo test (legacy)
src/hunterIntegration.tsNo test
src/leadEnrichment.tsNo test
src/platformScrapers.tsNo test
src/swedishOfficialsExtractor.tsNo test
src/websiteScraper.tsNo test
src/extractors/websiteExtractor.tsNo test
src/services/websiteScraperService.tsNo test
src/db/index.ts, src/db/schema.tsSchema tested indirectly (src/integration.test.ts); connection pool untested
src/db/enrichmentErrors.tsNo test
src/logger.tsNo test
src/mocks/newsApi.ts, src/mocks/officialRegistries.tsMocks for validationEngine.ts — no tests on the mocks themselves

Highest-risk untested files

Ranked by combination of business criticality and historical bug rate:

  1. src/queues/workers.ts — owns the reklamspärr P0 gate; a regression here is a GDPR incident
  2. src/compliance/reklamsparre.ts — the function the gate is supposed to call
  3. src/workers/enrichWorker.ts — Playwright concurrency P1
  4. src/enrichment/sources/serper.ts — every domain discovery and contact extraction depends on it
  5. src/enrichment/sources/maps.ts — the Google Places fallback that the failure analysis flagged as miscounted in scoring
  6. src/import/bolagsverket-import.ts / src/import/scb-import.ts — bulk ingest correctness has no automated check

See also

Test Strategy, Pipeline, Known Issues, Lead Scoring.

See also