Tutorial: User Interface Testing with Jest and Puppeteer

I started to consider testing with Jest and Puppeteer right after the library came out. Puppeteer has quite an interesting API.

Testing with Jest and Puppeteer

In the following post I’ll introduce you to a basic UI test for a contact form.

We will testing with Jest and Puppeteer. Even if it’s still under development and the API could be subject to changes, Puppeteer is here to stay.

Continue reading “Tutorial: User Interface Testing with Jest and Puppeteer”

4 + 1 ways for making HTTP requests with Node.js: async/await edition

HTTP requests with Node.js are a means for fetching data from a remote source. It could be an API, a website, or something else: at one point you will need some code to get meaningful data from one of those remote sources.

4 + 1 ways for making HTTP requests with Node.js: async/await edition

During your career as a Web Developer you will work with HTTP requests all the time. This is why in the following post I want to introduce you to some different ways for making HTTP requests in Node.js.

Starting from the easier one we will explore the “classic way” for doing HTTP requests all the way through libraries which support Promises.

Continue reading “4 + 1 ways for making HTTP requests with Node.js: async/await edition”

Going real time with Socket.IO, Node.Js and React

Looks like everybody is building chat apps with Socket.IO these days and while that’s completely fine, messaging applications are only the tip of the iceberg. Think a moment about it: there are literally a million of other things you can build within the real-time domain.

In the following post I would like to explore some interesting use cases and hopefully give you ideas about what to build next with Socket.IO. We will start with some basic concepts all the way through exploring what Socket.IO and React can do for us when paired together.

By the end of the article you will build a super simple real-time application:

Socket.IO and React paired together

That will be quite a long post! Grab a cup of tea and take a seat before getting started!

Continue reading “Going real time with Socket.IO, Node.Js and React”

How to inspect the memory usage of a process in Node.Js

While everyone seems to agree about the fact that premature optimization could be detrimental, you must care about performances either way: in the most simplest case you may want to know how much memory a given Node.js process uses during its execution.

In this post we will see how to use a Node.js builtin method in order to gain knowledge about the memory usage of any given process.

Continue reading “How to inspect the memory usage of a process in Node.Js”