JavaScript testing #18. E2E Playwright tests for uploading and downloading files

This entry is part 18 of 18 in the JavaScript testing tutorial

Our applications sometimes include features that allow users to select files from their hard drives, and some functionalities might let users download files. Implementing End-to-End tests that ensure that everything works as expected might not seem straightforward at first. In this article, we create a simple React application that lets users choose a JSON file […]

JavaScript Testing

JavaScript testing #17. Introduction to End-to-End testing with Playwright

This entry is part 17 of 18 in the JavaScript testing tutorial

With End-to-End testing (E2E), we test a fully working application where different parts of our application work together in real-life scenarios from start to finish. The End-to-End tests might also act as regression tests that check if our latest changes haven’t broken any previous features. We might also use them as smoke tests that ensure […]

JavaScript React Testing

JavaScript testing #16. Snapshot testing with React, Jest, and Vitest

This entry is part 16 of 18 in the JavaScript testing tutorial

Unit testing is handy for testing how our React components behave when the user interacts with them. However, this might not be enough. Besides testing the logic behind a particular component, we should also test if our user interface changes unexpectedly. We can use snapshot testing to detect unintended modifications to how our components render. Introduction to […]

JavaScript NestJS

API with NestJS #148. Understanding the injection scopes

This entry is part 148 of 156 in the API with NestJS

When a NestJS application starts, it creates instances of various classes, such as controllers and services. By default, NestJS treats those classes as singletons, where a particular class has only one instance. NestJS then shares the single instance of each provider across the entire application’s lifetime, creating a singleton provider scope. If you want to […]


Comparing ECMAScript Modules and CommonJS

JavaScript started as a simple language used to make static websites more dynamic and interactive. However, projects written in JavaScript began getting increasingly complex a long time ago. Because of that, it quickly became apparent that we needed a way to break the code into smaller, manageable pieces. Throughout the years, people have had many […]


Monorepos with Yarn Workspaces

With monorepos, we keep the code for different projects together in one big repository. This makes sharing and reusing the code across multiple projects easier and can simplify dependency management. Each project has its own directory, scripts, and dependencies. We can use Yarn workspaces designed with monorepos in mind to handle all that. In this […]


Understanding native JavaScript modules

It’s been a long time since the JavaScript projects began to grow in complexity. Because of that, breaking the code into manageable pieces became essential. In the history of JavaScript development, we went through many different approaches to splitting our code into modules. Good examples include solutions such as CommonJS, which is used in NodeJS. […]