Testing Serializers in Ember

Wednesday, November 4th, 2015

Every time you generate a serializer in Ember, it generates a corresponding unit test file.

Read More

The Adapter Pattern in JavaScript

Friday, October 16th, 2015

The adapter design pattern is very useful in JavaScript when it comes to data fetching and persistence. The travel adapter is the most common comparison for this pattern. If you have a three-pronged electrical plug, it won’t fit in a two-prong wall outlet. Instead, you need to use a travel adapter to convert energy from the wall outlet to the plug you have.

Read More

Unit Testing Angular Directives Part 2

Tuesday, September 1st, 2015

Earlier this year I wrote about Unit Testing Angular Directives with Isolate Scope. Now that I am working with Angular again, I’ve discovered another way to improve unit testing Angular directives using controllers. Let’s look at an example.

Read More

Rapid Ember.js Video Review

Monday, May 11th, 2015

Rapid Ember.js is an excellent 60 minute introduction to learning the Ember.js framework. The author William Hart does a great job at introducting the theory of MVC and Ember’s take on it which differs a little if you’ve worked with Backbone or Angular.

Read More

Taking Screenshots with CasperJS

Thursday, April 30th, 2015

Lately I have been trying out more end-to-end / integration testing with CasperJS. Having these tests in place seems valuable for critical paths of an application but it can be pretty frustrating when sometimes tests pass and other times they fail. For me, the test results have not been consistent. Because CasperJS doesn’t pop open a browser, it is difficult to know what exactly is going wrong. Many times I had a hunch that my tests were failing because of race conditions with the loading of the JavaScript of the pages under test. Then I discovered that CasperJS allows you take screenshots at any point during your test. This allows me to see if pages are fully rendering before assertions!

Read More