package
<!-- automd:badges color=yellow -->
npm install node-mock-httpGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
144.8 kB
Includes dependencies.
Node.js http.IncomingMessage and http.ServerResponse mocked implementations that allows emulate calling Node.js http handlers. (based on unjs/unenv v1).
[!NOTE] Documentation is incomplete!
import { fetchNodeRequestHandler } from "node-mock-http";
const nodeHandler = (req, res) => {
res.end("OK!");
};
const res = await fetchNodeRequestHandler(
nodeHandler,
"http://example.com/test",
);Published under the MIT license.
Made by community 💛
🤖 auto updated with automd