Why was this so hard to find, am I missing something? Are there better alternatives?
Closed this issue · 1 comments
GrayStrider commented
ike18t commented
For the scenario you have provided you don't even need mockery.
tasks(): Promise<Task[]> {
return Promise.resolve([]); // no need for mockery in this instance
}
It is hard for me to gather complete context from the screenshot but if what you provided is an attempt to mock a function on an object then you could do something like:
Mock.of<TaskGetter>({ tasks: () => Promise.resolve([]) })