Similar to testApi but used to test against a Fastify server that you've already started
elsewhere. This will merely attach all route listeners to it and return test callbacks.
The returned object includes a function to send fetches directly to the running api.
By default, this uses Fastify's request injection strategy to avoid using up real system ports.
To instead listen to an actual port, set port in the options parameter.
Similar to testApi but used to test against a Fastify server that you've already started elsewhere. This will merely attach all route listeners to it and return test callbacks.
The returned object includes a function to send fetches directly to the running api.
By default, this uses Fastify's request injection strategy to avoid using up real system ports. To instead listen to an actual port, set
portin the options parameter.