Category Archives: JavaScript

What are Unit Testing, Integration Testing and Functional Testing?

Test units of code, pieces together, or the full-fledged application

 

Finding your way around the maze that is JavaScript testing can sometimes be difficult. There are unit tests, integration tests, functional tests, E2E tests, browser tests… With so many buzzwords, who knows what they do and which one to use, what for, and when?

To help with that problem, in this article I’ll give you a guide comparing the different kinds of testing types available, and some recommendations for their use.

Read the article at codeutopia.net

Previewing ES6 Modules and more from ES2015, ES2016 and beyond

MS Edge adds ES6 features including import and export

 

Most of ES2015 (aka ES6) language support is already available in Edge, and last week’s Windows Insider Preview build 14342 brings more ES6 capabilities including modules, default parameters, and destructuring. We’re not stopping there – Edge also supports all ES2016 (aka ES7) proposals – the exponentiation operator and Array.prototype.includes – as well as future ECMAScript proposals such as Async Functions and utility methods like Object.values/entries and String.prototype.padStart/padEnd.

Read more from the source: Microsoft Edge Dev Blog

Node.js ES6 Support

Come on TC39, V8 and Node have implemented all but the most obscure parts of ES6–where is the standard for import?

 

NodeJS 6.1 passes 96% of ES6 tests, failing only on proper tail calls, iterator closing, and some Proxying of internal `get` calls.

But no standard is in sight for resolving resources based on the string in import statements.

View the compatibility table results at node.green

Changes to npm’s unpublish policy

npm decides to keep their unpublish functionality but puts in place rules to prevent breaking other packages

 

npm writes on their blog:

One of Node.js’ core strengths is the community’s trust in npm’s registry. As it’s grown, the registry has filled with packages that are more and more interconnected.

A byproduct of being so interdependent is that a single actor can wreak significant havoc across the ecosystem. If a publisher unpublishes a package that others depend upon, this breaks every downstream project that depends upon it, possibly thousands of projects.

Last Tuesday’s events revealed that this danger isn’t just hypothetical, and it’s one for which we already should have been prepared. It’s our mission to help the community succeed, and by failing to protect the community, we didn’t uphold that mission.

We’re sorry.

Read the whole post

The Difference Between Excellent, Good and Bad JavaScript Developers

All engineers write bad code. The best engineers think hard about how to refactor avoid the situation in the future.

 

We all want to be excellent at what we do. But being an excellent JavaScript developer is hard work. Measuring excellence is hard as well.

“Excellence is never an accident. It is always the result of high intention, sincere effort, and intelligent execution; it represents the wise choice of many alternatives – choice, not chance, determines your destiny.” – Aristotle

Read more at The Full Stack