Skip to content

test(enrich): add coverage tests (0% to 90.2%) - #468

Merged
BaaRai merged 1 commit into
BaaRai:mainfrom
sresarehumantoo:test/enrich-coverage
Nov 22, 2026
Merged

BaaRai merged 1 commit into
BaaRai:mainfrom
sresarehumantoo:test/enrich-coverage

Conversation

@sresarehumantoo

Copy link
Copy Markdown
Contributor

Add comprehensive test suite for the enrich package, raising statement coverage from 0% to 90.2%.

Tests for all pure functions (extractTitle, hostOf, uniq, id0, itoa),
engine lifecycle (enqueue edge cases, cooldown, close), DNS resolution
with both real and dead-DB asset stores, HTTP probing via httptest, and
worker integration. Uses a dead-DB pattern (unreachable PG) to exercise
code paths that discard DB errors without requiring a live database.
@BaaRai
BaaRai merged commit e11f4ba into BaaRai:main Nov 22, 2026
6 checks passed
@BaaRai

BaaRai commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Thanks @sresarehumantoo. Merged. The enrich package now has real coverage of the engine lifecycle and the HTTP and DNS paths, with the database tests isolated by the per-package suffix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants