You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
4 months ago | |
|---|---|---|
| .. | ||
| dist | 4 months ago | |
| LICENSE | 4 months ago | |
| README.md | 4 months ago | |
| package.json | 4 months ago | |
README.md
node-mock-http
Node.js http.IncomingMessage and http.ServerResponse mocked implementations that allows emulate calling Node.js http handlers. (based on unjs/unenv v1).
Usage
[!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",
);
Development
local development
License
Published under the MIT license.
Made by community 💛
🤖 auto updated with automd