Tutorial 2: Linked List This is the second tutorial in a series dealing with Test Driven Development (TDD) in JavaScript using Mocha and Chai. In this tutorial, we will expand on the use of Chai and the concept of Test-Driven…
Category: JavaScript
Test Driven Development in JavaScript with Mocha and Chai
What is this TDD We Keep Hearing About? A test-first software development process. TDD is characterized by a Red-Green-Refactor workflow. Red: a developer writes an initially failing automated test case that defines a new function or a new feature. Green:…
Testing a Widget
AMD JSONP Loader Module
Needed an AMD module for JSONP loading of scripts. The criteria, it had to be safe-ish, had to use promises conform to CommonJS Promises/A, specifically support Q, and work — gasp — without jQuery. I started with this article from…
Duff’s Device in JavaScript
We’re going to be discussing efficient JavaScript in some upcoming training sessions, and I wanted to get this code snippet out for discussion. Commonly, developers will process an array of values, calling some pre-defined function with this idion: var i=values.length;…