DEV Community

Discussion on: My first ever unit test

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
bassemibrahim profile image
Bassem

I am not the one to ask here. Still new to unit testing.

But i would say that you need to split these large functions into smaller units that would make them easier to test.

Collapse
 
Sloan, the sloth mascot
Comment deleted
 
bassemibrahim profile image
Bassem

I don't really know any other way than refactoring the code. But i really encourage you to do it. If you have the time. Just take backup and try it out. Best of luck 🤞