My Almost Unbearable Struggles With Learning New Things Part 1 : TDD Frameworks Struggles

Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. Basically we write and commit all the test first for a certain feature, and then we write the actual code that works for the test. As we write the test, we are making hypothetical code (what we want the program to do, what will happen if the program do this, etc).

In this article I’m about to recount my struggles with TDD. I am still learning alot about programming, and a lot of my struggles that I write here is mostly because of a learning process. Please take it with a grain of salt ;)

As part of my Software Projects course, it is required to implement the use of TDD for every project. It is expected for every project to reach 100% coverage on tests.

For a long time we used django and springboot in our projects. But in my team’s current project, we used a stack that haven’t been used before since our time at the university which is Mongo DB, Express.js, Vue.js, and Node.js. New stack means learning new things and unlearning useless things, one of which with test. Which comes with our first struggle.

Choosing the right testing frameworks

“What do you mean I have to choose testing frameworks”

First time I got in, just to make a starter for our project, as a person who have just given a freedom of choice after not using django, I was actually confused on what testing frameworks should I choose for our project. A simple google search would help me find which one but to make sure, I had to try them myself. And oh lord, it was a trial and error indeed as I have to guess where my errors come from when I put the test, making it harder for me to decide which one is actually the better one.

Turns out, it’s just my laptop being very uncooperative as my friend does the exact same on his linux machine and it works flawlessly. Maybe it was my outdated node.js installation. Since tutorials and resources for jest is easier to find, we used jest for our backend testing.

Lesson Learned : Check your versions

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Javascript, write it clean PART 1 : variables.

Discovering the Nature of Truth in React.JS

My first competition as a hackathon noob

React Query with Next.js ISR: Static websites with dynamic content

3 Reasons to Learn More Vanilla JavaScript

Create an Authentication API using Node.js, Express, MongoDB and JWT

CRUD operation using JavaScript and client API

Friday Frontend: NodeConf Colombia Edition

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahmad Haydar

Ahmad Haydar

More from Medium

Creating a better Zoom background with the help of GitHub Copilot

Simple code that implement countdown on React.

# Always Be Commenting

Insiders’ Guide to Finding the Best Developer: Concise version