Injects a fake HTTP request/response into a node HTTP server for simulating server logic, writing tests, or debugging. Does not use a socket connection so can be run against an inactive server (server not in listen mode).
Lead Maintainer: Matt Harrison
Example
// Load modules const Http = ;const Shot = ; // Declare internals const internals = {}; internals { const dispatch = { const reply = 'Hello World'; res; res; }; const server = Http; const res = await Shot; console;}; internals;
Note how server.listen
is never called.
API
See the API Reference