Summary
docs/src/stdlib/http.md advertises Fastify as "API-compatible with the npm package", but the example block is marked no-test because server.listen() blocks forever. The doc-tests harness therefore only verifies the example compiles and links — it never actually runs the server, makes a request, or confirms a response.
This means the "API-compatible" claim has no end-to-end test coverage in-repo for the one stdlib module people are most likely to try. Stubs or regressions in any handler / routing / reply path could land without the harness noticing.
Evidence
- Example block in
docs/src/stdlib/http.md tagged typescript,no-test with app.listen({ port: 3000 }, ...).
- No matching integration test in
test-files/ or crates/perry-stdlib/tests/ that starts a Fastify server and issues an HTTP request against it.
Suggested fix
Add a real integration test — either in test-files/ or as a doc-example test — that:
- Spawns the Fastify server in a background thread (or
spawn_for_promise_deferred).
- Hits it with
fetch from the main thread.
- Asserts the JSON response body.
- Shuts the server down cleanly.
Alternatively, expose a server.listen({ port, signal }) shape that takes an AbortController-style cancel so the doc example can exit deterministically, then flip the block off no-test.
Until one of those lands, the stdlib docs should probably qualify "API-compatible" → "partially implemented; see open issues" in the http page.
Summary
docs/src/stdlib/http.mdadvertises Fastify as "API-compatible with the npm package", but the example block is markedno-testbecauseserver.listen()blocks forever. The doc-tests harness therefore only verifies the example compiles and links — it never actually runs the server, makes a request, or confirms a response.This means the "API-compatible" claim has no end-to-end test coverage in-repo for the one stdlib module people are most likely to try. Stubs or regressions in any handler / routing / reply path could land without the harness noticing.
Evidence
docs/src/stdlib/http.mdtaggedtypescript,no-testwithapp.listen({ port: 3000 }, ...).test-files/orcrates/perry-stdlib/tests/that starts a Fastify server and issues an HTTP request against it.Suggested fix
Add a real integration test — either in
test-files/or as a doc-example test — that:spawn_for_promise_deferred).fetchfrom the main thread.Alternatively, expose a
server.listen({ port, signal })shape that takes anAbortController-style cancel so the doc example can exit deterministically, then flip the block offno-test.Until one of those lands, the stdlib docs should probably qualify "API-compatible" → "partially implemented; see open issues" in the http page.