marvinhagemeister / xhr-mocklet

Mock XMLHttpRequests in both the browser and node
5 stars 1 forks source link

Add response shorthand for primitive responses #6

Open marvinhagemeister opened 7 years ago

marvinhagemeister commented 7 years ago

Instead of:

mock.get("/foo", (req, res) => res.body({ foo: "bar" });

it would be cool if we could just write:

mock.get("/foo", { foo: "bar" });