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[@] Your question and answer will appear on and help other developers.

Related Questions & Answers