Testing UcabGo

Testing UcabGo

Or my attempts at least...

Using the Udemy course, I am going to start developing some unit tests for my mern application. I am doing this for learning purposes because this is a College Project and I am not required to do tests.

To be honest I am still not sure why tests are necessary, especially after development. I guess it's just a way for us to cope with the uncertainty of our code's stability.

Setting it all up

I don't know if only Fernando(course instructor) does it this way, but testing a react application takes a lot of setup and configuration. All of which feel extremely fragile and bound to fail if one line is edited incorrectly.

I just finished setting it all up but I am still not sure if it's all going to work.

Test settings

After doing some changes I want to keep the settings for my tests to start working:

Use this link for copying the settings and adding the dependencies.

It is important to have the .cjs on the config files, otherwise, it won't work.

Aftermath

Testing a long and boring job, I guess it's cool because it's giving a sense of safety of my code but damn, it takes a long time to test everything the app does. I don't think I will test everything, I just want to start learning Next.js and GraphQl so that I can apply to this company I have in mind.