Skip to content
Advertisement

React testing mock variable in functional component

Please help. I cannot run test because in my util langProvider is package that drops tests. I have to mock langProvider function or strings variable. How I can do that?

JavaScript

My test file

JavaScript

Advertisement

Answer

not sure, but you can try to insert in your test file before describe function, something like that:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement