This is part 2 on the topic of Expressjs controller unit testing. Previously, I added unit tests for 5 basic CRUD APIs for vehicle. In this post I will show one more example, where controller logic gets a little longer.
[Read More]
Unit Testing Expressjs Controller (Part 1)
Stepwise Test Driven Development of Express Mongoose CRUD APIs
So far, I have not found a real workable example of unit testing Express controller/route for API. Most I saw either label integration test as unit test or offer little meaningful in right direction.
[Read More]Node Express Endpoint to Upload and Process CSV File
It is quite common in Node Express backend development to come across a requirement of parsing and processing CSV files. Usually, it is to store the content in the database after processing.
In this post, we will upload a CSV file, store it temporarily in the server directory to fetch all rows in JSON form, push all rows in an array, and remove the temporary file.
[Read More]