Front-End

How to Set up React Test with Mocha and Enzyme for TypeScript

Enzyme is created by Airbnb for React component testing. You can easily test components’ output and it works with different testing frameworks like Mocha or Jest. This post focuses on setting up the test environment with Mocha for TypeScript. If you are used to JavaScript and fairly new to TypeScript, …

Front-End

React Unit Test Code Snippets with Jest and Enzyme

Sometimes all I need is to see a snippet of code without much explanation when I try to find a solution online. This is because I am familiar enough with the language and framework and need a quick reminder. So, here it is. I created a post with a few …

Front-End

Unit Testing React Form with Jest and Enzyme

Jest is a JavaScript unit testing framework created by Facebook. I usually use mocha for unit testing Node.js code, but when it comes to testing React, Jest combined with Enzyme is pretty much the best. Enzyme is a JavaScript utility library created by Airbnb. It lets you simulate DOM rendering …

Front-End

When My Webpack 4 Server Suddenly Stopped Working

Now, I have a React development environment with webpack 4 set up on my local Windows 10 machine (How to set up local development environment for React with webpack 4 and babel 7). I have encountered a few occasions that the webpack server suddenly stopped starting and giving me the …

Front-End

Starting React.js in 30 seconds

When you think about React, it is basically a Javascript library rather than a framework. This means you can import React library in the script tag in your html file and write an inline code, just like jQuery. I previously wrote a post about setting up React development environment by …

Web Technologies

How to Set up Loacl Development Environment for React with Webpack 4 and Babel 7

It is universally acknowledged that setting up a local dev environment is hard work. Especially for javascript frameworks that get constantly updated. The documentation for the older version suddenly stops working and you have to make sure you are installing the correct versions. In this post, I will show you …