Latest Updates

Documenting code, one commit at a time.

English 10 posts
×

Unlocking Testability: Decoupling Express App and Server Startup

Our ims-api project, built with Express.js, was initially structured with the application definition and server startup logic in a single file. This approach, while straightforward for simple projects, quickly became a bottleneck for effective testing and modular development. Every time we wanted to test an API endpoint, we'd inadvertently spin up the entire server, leading to slower, more

Read more

Boosting API Reliability with Comprehensive Mocked Tests in TypeScript

Introduction

Building robust APIs requires diligent testing. In our ims-platform/ims-api project, ensuring every new feature and bug fix maintains the high standard of reliability is paramount. This recent work focused on enhancing our test suite, specifically by implementing comprehensive mocked tests that cover both success and failure paths.

The Problem

While integration tests are

Read more

Streamlining Development in ims-api: Why Consistent Code Formatting Matters

In the fast-paced world of software development, maintaining a clean, readable, and consistent codebase is paramount for team collaboration and long-term project health. The recent chore: format with prettier commit to the ims-api project highlights a crucial aspect of this: adopting automated code formatting.

Consistent code style reduces cognitive load for developers, makes code reviews

Read more

NestJS Modularity: Learning from a Reverted TypeORM and Service Export

The SBSofiaBartoli/ecommerce-md-back project is an e-commerce backend system. We recently encountered a common challenge related to module design and dependency management when implementing features.

The Situation

During a recent development cycle for our e-commerce backend, a new feature involving user management required access to the UsersService and certain TypeORM repository

Read more