Featured

JavaScript

[1] + [2] – [3] === 9!? Looking into assembly code of coercion.

Variable values have certain types. In fact, you can cast a value of one type to the other. If you do it explicitly, it is type casting (also called explicit coercion). If it happens in the background when you are trying to perform an operation on types that do not match, it is called coercion (sometimes referred to […]

JavaScript Testing

JavaScript testing tutorial – part four. Mocking API calls and simulating React components interactions

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

Today we test our React components further. It involves simulating component interactions and mocking the API calls. You will learn how to do both, so let’s go! Mocking A common thing is for our application to fetch some data from the API. A problem with it is that might fail for various reasons, such as […]

JavaScript Testing

JavaScript testing tutorial – part three. Testing props, the mount function and snapshot tests.

This entry is part 3 of 4 in the JavaScript testing tutorial

Hello! In the previous part of the tutorial, we’ve covered the very basics of testing React components with Enzyme. Today we will dig a bit deeper and learn how to test props, how (and why) use the mount function and what are the snapshot tests. Let’s go! Testing props In the previous article, we’ve tested […]

JavaScript Testing

JavaScript testing tutorial – part two. Introducing Enzyme and testing React components

This entry is part 2 of 4 in the JavaScript testing tutorial

At the previous part of the tutorial, we’ve briefly covered the basics of unit testing. This time we will go further and start testing React with the Enzyme library. Thanks to the that, your application will be more reliable and it will be easier to avoid regression. Even though we will be using Jest here, Enzyme also works […]

JavaScript Testing

JavaScript testing tutorial – part one. Explaining types of tests. Basics of unit testing with Jest

This entry is part 1 of 4 in the JavaScript testing tutorial

Hello! Today we start another big series, which is about JavaScript testing. There are various different types of tests and we will start by explaining some of them. In the beginning, we will cover the basics of unit testing, which is testing individual parts of our application and checking if they are fit to use. To […]

JavaScript Webpack

Webpack 4 course – part six. Increasing development experience

This entry is part 6 of 8 in the Webpack 4 course

Today we will cover the development value of the mode property. It will automatically set the webpack configuration for you to make the development easier. Aside from that, we will also cover the wepback-dev-server and webpack-serve – Hot Module Replacement included. Let’s go! Webpack 4 course: a development server A one step forward to a better development experience […]

JavaScript Webpack

Webpack 4 course – part three. Working with plugins

This entry is part 3 of 8 in the Webpack 4 course

Hello! Today we introduce the concept of plugins. They differ from loaders in a way that they can perform a wider range of tasks. Basically, they do anything else, that loaders can’t do. While loaders are tied to a certain type of files, plugins can be more generic. This time we will learn what purpose […]