VueJS + Jest. Write unit tests on components in the VueJS for the first time

In my office, the engineers are being encouraged to write a unit test of the code they are writing. As a software engineer, this is my first experience to write unit tests in the components that I create. I will share a little about how I make unit tests in the Vue component. I use Jest as a framework to write unit tests in Vue components. Besides that, I also use vue-test-utils as a testing library....

June 25, 2019 · 4 min · Rizal Asrul Pambudi

Truthy and false values: make your code more efficient

I decided to write about truthy and false values as the topic this time, after yesterday there was a long pause. I took this topic because I was greatly helped by truthy and false values, especially in terms of the efficiency of writing lines of code. What are truthy and falsy values? The developers who have been using javascript for a long time will be familiar with the terms truthy and falsy....

August 18, 2018 · 5 min · Rizal Asrul Pambudi

Working with objects in Javascript

Based on experience when I started learning JavaScript, understanding objects is something fundamental. The essence of JavaScript is on the object data type. If we have studied Java or .Net programming, we must be familiar with integer, float, char, and string as primitive data types. In the JavaScript — not only has primitive data types — it also has complex data types, namely object as reference data types. What is object?...

December 30, 2017 · 3 min · Rizal Asrul Pambudi