9/03/2014

The jQuery Radio: Custom Triggers For a Pub/Sub Model

I like jQuery. It's the first library I used that gave me the "JavaScript is Awesome" tingle. Putting aside the many arguments for and against, jQuery is still used all around the web. When building from scratch we may choose more modern frameworks. However, building from scratch is a fine luxury and the exception to the norm. Many JavaScript programmers, if not most, spend their time improving existing sites and adding additional functionality. The result is that many of us still use jQuery on a daily basis. jQuery is also a great library for JavaScript beginners to get started with. So this post will visit one of jQuery's neatest features, "trigger".

6/04/2014

Angular and Jasmine: Injecting into the test environment

I have set my sights on improving my Angular proficiency, however I am not ready to give up on all my other tools. I have a strong preference for Jasmine, and the recent release of 2.0 further cemented that comfort zone. Jasmine 2.0 made major improvements by removing window dependency and improving async support. Using Jasmine and Jasmine-Node together allows me to write tests in the same language for both server and client. I prefer to standardize as much as possible on a project, and having one language for tests on both application tiers is valuable to me in time and effort saved.

2/10/2014

Enyo Observables: Making kinds self-sufficient

These are exciting times in the Enyo world; Enyo is soon to release version 2.4. This is an extremely important release that brings MV* features and a host of language improvements. I am going to discuss a feature new to Enyo called "Observables", and the power it has when combined with Enyo's inheritance model.

11/21/2013

Jasmine-Node and Rewire, Part 2: Making the test complete

In the previous post I introduced the concept of using Rewire with Jasmine-Node to simplify Node.js unit testing. Rewire added a __set__ and a __get__ function to the module which let us grab a function in the module, and test it directly. We could test the function's output by controlling the objects that the function worked with, and checking them upon function completion. We didn't need to manipulate any internals of the function so our testing is still honoring the "Black Box" concept of unit testing. The idea is that the unit test only cares about what the testee can take in, return, and manipulate outside itself. How that operation is performed is not important to the unit test.

There was one test we didn't look at which I want to discuss now.

Copyright

All original content in this blog belongs to the author, and can not be reproduced, integrated, or used without explicit consent. All links to this page are welcome, but please link to the blog page itself.