ES6 – Compared with current Javascript

The current Javascript standard that is mostly supported are the 5th Edition (or ES5). In 2015, the 6th edition (ES6) is officially finalized, and ES7 is officially finalized in 2016. But, the browser support for ES5 is still incomplete, thus developers should not write their current javascript in ES5 standard. So, developers dreaming to write their code in ES6 (or ES7) should use a transpiler (e.g. Babel) to transpile their code into ES5 code.

ES6 brings many many cool features, which is highly useful for developers in writing their code more cleanly. In this post, it will be mentioned some really useful features added to ES6 which is not there in ES5. Continue reading “ES6 – Compared with current Javascript”

Advertisements

Understanding Spy, Stub, and Mock

Welcome back readers! Well, after creating 2 posts explaining about testing on frontend in a row, on this time I’ll also talk about testing! Lol. Actually this time will be more general. However, I applied this knowledge most of cases on frontend so I’ll give an example on frontend side too haha, forgive me plz. Yep, on this time I will talk about testing techniques which are spy, stub, and mock. I was really really starved to know what actually they are and now I want to end my curiosity. I’ll explain to you what actually they are! 😀

Continue reading “Understanding Spy, Stub, and Mock”

Connect to the Data

When developing an applications, developers need a way to save modify and query the data. The application may use the a database management system (DBMS) to store the data but how to modify and retrieve data in the DBMS? DBMS has a set of raw commands to run operations on the system, for example SQL commands. We could use it in raw but it will make the codes look dirty.

Continue reading “Connect to the Data”

Golden Way to Traverse React Components on Shallow Rendering Approach

On my last post, I’ve talked about shallow rendering to test React components. This post is the sequel of that post since I’ll also talk about testing React components. The shallow rendering that I’ve done on the last post is using the help from createRenderer function from React Addons Test Utils. Unfortunately, (until now) there are no function for traversing React element trees neatly just by using the help from React Addons Test Utils. If you want to check an element somewhere deep in the component tree, you will end up in a long chaining of props.children.props.children… which it also happened to me and I think it’s not elegant.

Continue reading “Golden Way to Traverse React Components on Shallow Rendering Approach”