Our backend is also in need of unit tests. Let's install a test framework so we can test our api routes, utilities, and other backend functions.
I recommend that we (like the frontend) use Jest so we have a common test environment on both ends of the app. We can also use Supertest for our endpoint-specific tests.
Our backend is also in need of unit tests. Let's install a test framework so we can test our api routes, utilities, and other backend functions.
I recommend that we (like the frontend) use Jest so we have a common test environment on both ends of the app. We can also use Supertest for our endpoint-specific tests.
Here's a guide that might be helpful in getting started on this one: https://dev.to/nedsoft/testing-nodejs-express-api-with-jest-and-supertest-1km6