Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a finished project that I submitted yesterday to a client, and this morning he said that he'd like it if I implemented a few Unit Testing Frameworks into the project;
Jest for Unit testing : integration of Jest [ Test Runner ]
Enzyme [ Container UI Test ]
Storybook [ Component UI Test ] ,
redux-saga-tester [ Business Logic and Integration Test]

What I have tried:

<pre>I'm new to unit testing so I'm not quite sure how to use these, and what to use these for (considering my project is already done?). Can somebody please explain to me how I'm supposed to use these, please? 

Mt project is just a simple app made from React Native that uses the Zomato API to retrieve a list of restaurants as well as allows the user to search for restaurants.
Posted
Updated 6-Jan-20 11:20am

Quote:
I'm new to unit testing so I'm not quite sure how to use these

Google is your friend : Unit testing - Wikipedia[^]
Quote:
and what to use these for

It is used to check that your code gives expected results.
 
Share this answer
 
Comments
Member 14708673 6-Jan-20 20:13pm    
but what is the point of that when I can just run the app on a simulator and see everything working completely fine?
If you didn't design your code with unit testing in mind, you've got a LOT of work to do to add that capability.

You can't just a some uniting module and call it good. Your code has to be written to be testable, and that means writing your code against Interfaces. If you haven't done this, your code is not going to be very testable.
 
Share this answer
 
Comments
Member 14708673 6-Jan-20 18:20pm    
damn, so you're saying I may have to start the project all over again?
Dave Kreskowiak 6-Jan-20 18:44pm    
Yep.
Member 14708673 6-Jan-20 20:02pm    
but what is the point of that when I already know the code is working fine? is there supposed to be something I may be missing?
Dave Kreskowiak 6-Jan-20 21:46pm    
When you make changes to the code, the testing makes sure the code is STILL working without you having to go through and manually test it yourself.
Member 14708673 7-Jan-20 0:39am    
ahhh I see. So for a finished project it's essentially useless until I decide to add future changes, correct?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900