Firecrawl asks contributors to define the API's success and failure paths before coding. The guide names the environment checks behind optional tests and provides one harness command for the API and workers. Local runs stay focused; CI runs the full suite.
The test-first sequence requires a happy path and at least one failure path. Its definition of done is observable API behavior, with end-to-end tests preferred over unit tests.
Source excerpt starting at line 6.
61. Write some end-to-end tests that assert your win conditions, if they don't already exist
02 / Verification by change type
Make environment gates executable
The file gives literal conditions for tests that require AI or fire-engine. A contributor can use the same capability checks as the existing suite instead of guessing what a self-hosted configuration supports.
Source excerpt starting at line 13.
13 - If it requires AI: `!process.env.TEST_SUITE_SELF_HOSTED || process.env.OPENAI_API_KEY || process.env.OLLAMA_BASE_URL`
03 / Hard prohibitions
Let the harness start its dependencies
The command is accompanied by an explanation of what it starts and a warning against launching the API manually. Service lifecycle belongs to the harness.
Source excerpt starting at line 16.
16 - `pnpm harness` is a command that gets the API server and workers up for you to run the tests. Don't try to `pnpm start` manually.
04 / Verification by change type
Split local feedback from full coverage
The workflow acknowledges the full suite's cost and directs local effort to relevant tests, followed by CI verification.
Source excerpt starting at line 17.
17 - The full test suite takes a long time to run, so you should try to only execute the relevant tests locally, and let CI run the full test suite.
Ideas for your repo
01Ask for at least one failure path alongside the happy path.
02Publish exact environment predicates for optional integration tests.
03Explain which services a test harness owns.
04State where the full suite runs when local checks are focused.
Sponsored by
Give your agents the whole story.
These instructions explain how to work in Firecrawl. Modem shows your agents what customers said, who is affected, and what changed.