# Testing signals — firecrawl/firecrawl

> Canonical page: https://codevetter.com/unpack/firecrawl/testing-signals

# Testing signals — firecrawl/firecrawl

Scanned commit 556c12c9d293bc7392feb008946944d54068d04c (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Tests run under Vitest (vitest.config.ts, globals on, 120s timeouts, junit output) with ~112 test files under src/__tests__ plus colocated *.test.ts units. The dominant pattern is 'snips' — end-to-end tests hitting a live API brought up by `pnpm harness` — gated by env flags (TEST_SUITE_SELF_HOSTED, OPENAI_API_KEY, SEARXNG_ENDPOINT, PROXY_SERVER). CI (test-server.yml) runs a matrix over engine/proxy/search/ai/nuq-backend on self-hosted infra. Coverage is strong on the scrape pipeline and route surface; deep unit coverage exists for config-adjacent libs but many services/ workers have no dedicated tests.
- Test runner is Vitest with globals:true, environment node, include src/**/*.test.ts, testTimeout/hookTimeout 120s, junit reporter to test-results/junit.xml; a resolve alias redirects pdf-parse to skip its module.parent debug self-test. — [apps/api/vitest.config.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/vitest.config.ts)
- package.json test scripts split the suite by auth mode: test (exclude e2e_noAuth), test:local-no-auth (exclude e2e_withAuth), test:full, test:prod, and test:snips scoped to src/__tests__/snips/v1 and v2. — [apps/api/package.json#L17-22](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/package.json#L17-L22)
- Snips are true E2E: __tests__/snips/lib.ts derives TEST_API_URL/TEST_SUITE_WEBSITE from config, exposes describeIf/testIf gating helpers and capability flags (HAS_FIRE_ENGINE, HAS_PLAYWRIGHT, HAS_PROXY, HAS_AI), and refuses local TEST_SUITE_WEBSITE in production mode. — [apps/api/src/__tests__/snips/lib.ts#L9-60](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/__tests__/snips/lib.ts#L9-L60)
- The snips/v2 directory alone holds ~40 suites covering scrape, crawl, batch, map, parse, parsers/pdf variants, billing, concurrency, keyless, key-restriction, ip-restriction, idempotency (idmux), browser replay, monitors, agent auth/threads/effort, alexandria feedback and Express 5 behavior. — [apps/api/src/__tests__/snips/v2/crawl.test.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/__tests__/snips/v2/crawl.test.ts) [apps/api/src/__tests__/snips/v2/scrape.test.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/__tests__/snips/v2/scrape.test.ts) [apps/api/src/__tests__/snips/v2/keyless.test.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/__tests__/snips/v2/keyless.test.ts)
- AGENTS.md prescribes the workflow: write E2E 'snips' (1 happy + 1+ failure path), always use scrapeTimeout from ./lib, gate fire-engine tests with !TEST_SUITE_SELF_HOSTED and AI tests additionally on OPENAI_API_KEY/OLLAMA_BASE_URL, then run via `pnpm harness jest` (never pnpm start manually). — [AGENTS.md](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/AGENTS.md)
- CI test-server.yml runs a self-hosted matrix (playwright|fetch × proxy|no-proxy × searxng × openai × nuq postgres, plus one fdb-backend leg) with redis/rabbitmq services, installing FoundationDB client and setting NUQ_DATABASE_URL/NUQ_RABBITMQ_URL/USE_GO_MARKDOWN_PARSER/ALLOW_LOCAL_WEBHOOKS. — [.github/workflows/test-server.yml#L11-65](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/.github/workflows/test-server.yml#L11-L65)
- Each SDK has a dedicated publish/test workflow (test-js-sdk, test-go-sdk, test-rust-sdk, test-dotnet-sdk, etc.) and repo-level workflows cover deploy-image staging/prod, nuq-postgres deploy, playwright deploy, redis deploy, scrape-evals and npm-audit remediation. — [.github/workflows/test-server.yml](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/.github/workflows/test-server.yml) [.github/workflows/publish-js-sdk.yml](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/.github/workflows/publish-js-sdk.yml) [.github/workflows/deploy-image-staging.yml](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/.github/workflows/deploy-image-staging.yml)
- Unit tests exist colocated for critical libs: exchange.test.ts, canonical-url.test.ts, crawl-redis.test.ts, job-state-store.test.ts, key-restriction.test.ts, image-ocr-gate.test.ts, ip-restriction.test.ts, oauth-token-introspection.test.ts, rate-limiter.test.ts, scrapeURL.test.ts and snips mocks under __tests__/snips/mocks. — [apps/api/src/lib/exchange.test.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/lib/exchange.test.ts) [apps/api/src/lib/job-state-store.test.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/lib/job-state-store.test.ts) [apps/api/src/scraper/scrapeURL/scrapeURL.test.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/scraper/scrapeURL/scrapeURL.test.ts)
- Coverage gaps: worker orchestration files (queue-worker.ts, nuq.ts, nuq-worker-runner.ts, harness.ts) and most services/monitoring, webhook delivery internals, and the go-html-to-md-service (only handler_test.go) have thin or no direct unit tests — behavior is mostly exercised through snips. (inferred) — [apps/api/src/services/queue-worker.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/services/queue-worker.ts) [apps/api/src/services/worker/nuq.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/src/services/worker/nuq.ts) [apps/go-html-to-md-service/handler_test.go](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/go-html-to-md-service/handler_test.go)
- A dedicated test fixture app (apps/test-site, name firecrawl-test-site) and TEST_SUITE_WEBSITE=http://127.0.0.1:4321 in CI provide deterministic scrape targets; knip (knip.config.ts) plus a pre-commit hook enforces no unused exports/files. — [apps/api/package.json](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/package.json) [.github/workflows/test-server.yml#L40-41](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/.github/workflows/test-server.yml#L40-L41) [apps/api/knip.config.ts](https://github.com/firecrawl/firecrawl/blob/556c12c9d293bc7392feb008946944d54068d04c/apps/api/knip.config.ts)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
