我有一个返回另一个函数的函数:
const returnedFunction = () => {}
const returnFunction = () => {
const function = returnedFunction();
// Do stuff
return function;
}
returnFunction我想测试从is 类型返回的函数类型returnedFunction。Jest 似乎在回应中接受了它:
expect(received).toBe(expected) // Object.is equality
Expected: "[Function returnedFunction]"
Received: [Function returnedFunction]
但我不知道如何匹配它们。
慕桂英546537
回首忆惘然
相关分类