How can I check a function is a mocked function?

后端 未结 0 1711
谎友^
谎友^ 2020-12-08 12:33

We can use jest.isMockFunction(fn) to verify whether a function is mocked or not. From the source code, we know jestjs will set a private property _isMock

相关标签:
回答
  • 消灭零回复
提交回复
热议问题