Jest basics: Testing function from component

Posted by Andre Scott | Updated on

You have stubbed the function with one that does not return anything. FirstComponent.sayMyName = jest.fn(); To test the function, typically you can just do:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers