Intercepting useContext call with jest

前端 未结 0 1870
一整个雨季
一整个雨季 2021-01-06 10:25

I want to do something like this

const useContextSpy = jest.spyOn(React, \'useContext\');
const value = useContextSpy.mock.results[0];

And in

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