Similar to testService 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 to directly to the running service.
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 testService 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 to directly to the running service.
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.