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
| File | Why it matters |
|---|---|
src/queues/workers.ts | Defines the three BullMQ workers Scrape/Enrich/Update. The reklamspärr P0 gap in Pipeline lives here. |
src/queues/scheduled-jobs.ts | Cron-style scheduled enqueueing. |
src/workers/enrichWorker.ts | The actual enrichment worker process — the one that runs Playwright inline (P1 in Known Issues). |
src/workers/enrichDispatcher.ts | Routes enrich jobs. |
src/workers/playwrightWorker.ts | Playwright pool — the proposed decoupling target. |
src/workers/updateWorker.ts | Persistence worker. src/integration.test.ts tests a parallel reimplementation of its handler, not this file. |
src/workers/art14Worker.ts | Article 14 notification worker. |
Compliance — partial
| File | Status |
|---|---|
src/compliance/reklamsparre.ts | No 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.ts | Partial — 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 intests/enrichment/board-members-integration.test.ts)
Untested:
src/enrichment/sources/serper.ts— Serper.dev API clientsrc/enrichment/sources/maps.ts— Google Places fallback (see Google Places)src/enrichment/sources/linkedin.tssrc/enrichment/sources/hunter.ts— Hunter.io email enrichmentsrc/enrichment/sources/website.ts— direct site scraper used by Crawlee Scrapersrc/enrichment/sources/newsJobs.tssrc/enrichment/ecoApiIntegration.tssrc/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
| File | Status |
|---|---|
src/validation/layers/registryLayer.ts | No test. The Layer 1 of the Lead Scoring rubric. |
src/validation/layers/newsLayer.ts | No test. Layer 4. |
src/validationEngine.ts | Smoke only (src/validationEngine.test.ts — 2 tests). |
Lib / infra — mostly untested
| File | Status |
|---|---|
src/lib/validation.ts | Tested (src/lib/validation.test.ts) |
src/lib/article14Notification.ts | Tested (in src/enrichmentEngine.v7.test.ts) |
src/lib/redis.ts | No test |
src/lib/redisClients.ts | No test |
src/lib/keycloak.ts | No test (security tests only document env-var requirements) |
src/lib/embeddings.ts | No test (1536-dim shape assumed in tests/api/documents.test.ts) |
src/lib/smtpEmailValidator.ts | No test |
src/lib/webhooks.ts | No test |
src/lib/apiTokenCounter.ts | No 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
| File | Status |
|---|---|
src/api/index.ts | Hit through every API integration test (server entry) |
src/api/auth.ts | Tested — 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.ts | Tested via integration |
src/api/kundkort.ts | Tested (tests/api/kundkort-enrich.test.ts) — 1 endpoint |
src/api/scrape.ts | No test |
src/api/export.ts | Partial — only sanitizeCSVValue tested (tests/api/security.test.ts) |
src/api/validation.ts | Partial — validateCompany, validateLead, validateValidationResult tested via tests/api/structure.test.ts |
src/api/enrichmentErrors.ts | No test |
src/api/middleware/auth.ts | Indirectly via 401 assertions; no unit |
src/api/middleware/rate-limit.ts | Smoke only — header-presence assertion |
Top-level orphans
| File | Status |
|---|---|
src/index.ts | No test (BullMQ pipeline entrypoint) |
src/cache.ts | No test |
src/contactPositionMapper.ts | No test |
src/emailDiscovery.ts | No test |
src/eniroIntegration.ts, src/eniroScraper.ts | No test |
src/googleMapsScraper.ts | No test (legacy) |
src/hunterIntegration.ts | No test |
src/leadEnrichment.ts | No test |
src/platformScrapers.ts | No test |
src/swedishOfficialsExtractor.ts | No test |
src/websiteScraper.ts | No test |
src/extractors/websiteExtractor.ts | No test |
src/services/websiteScraperService.ts | No test |
src/db/index.ts, src/db/schema.ts | Schema tested indirectly (src/integration.test.ts); connection pool untested |
src/db/enrichmentErrors.ts | No test |
src/logger.ts | No test |
src/mocks/newsApi.ts, src/mocks/officialRegistries.ts | Mocks for validationEngine.ts — no tests on the mocks themselves |
Highest-risk untested files
Ranked by combination of business criticality and historical bug rate:
src/queues/workers.ts— owns the reklamspärr P0 gate; a regression here is a GDPR incidentsrc/compliance/reklamsparre.ts— the function the gate is supposed to callsrc/workers/enrichWorker.ts— Playwright concurrency P1src/enrichment/sources/serper.ts— every domain discovery and contact extraction depends on itsrc/enrichment/sources/maps.ts— the Google Places fallback that the failure analysis flagged as miscounted in scoringsrc/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.