Unit Testing

Reading Time: 2 minutes

A post three days after the latest post?! I didn’t think I would see the day.
Hi everyone! I hope all of you had a lovely week.

I’ve been working on Unit Testing for my MERN e-Commerce site this whole week. For the most part, it was easy, with all of them passing the test until I got to the Header component. The Header component gets store reducers such as cart items and login information. So it was painful for me to create a test utils file so it could replicate the redux store.

Now the Header test file passes, but I need to add more tests. Just because I could render the component after lots of reiteration of the test file doesn’t mean I was done. I was able to test if the component renders the cart amount, but I still need to test if the Admin drop-down renders if the user is an admin and if the profile drop-down renders when a normal user logs in.

I fear doing the back-end test files since Header gave me issues, but part of my career is learning new things and overcoming my fears!

Github Streak (26 Days)

Currently, my highest streak is 26 days! Hopefully, I can get it to 50 days. If only Github had like a streak freeze or something, that would be interesting but I’ll just make sure I won’t forget to push something today and tomorrow!

Coffee and Code

Tomorrow I’ll be going attending the Coffee and Code event in NYC! Last time it was fun meeting new people and attending conferences there. An old friend and one acquaintance from the Get Hired community. I’ll try to not miss my first train like I did last time. I’ll let you all know what happens!

Leave a Reply