A reply value or a function that produces one. Async functions are supported.
server.when("echo").reply((req) => `You said: ${req.lastMessage}`);server.when("slow").reply(async (req) => { return { text: "Done thinking." };}); Copy
server.when("echo").reply((req) => `You said: ${req.lastMessage}`);server.when("slow").reply(async (req) => { return { text: "Done thinking." };});
type Resolver = Reply | ((req: MockRequest) => Reply | Promise<Reply>)
A reply value or a function that produces one. Async functions are supported.