Category Archives: Testing

JavaScript Unit Test Gotcha: Element Focus

The task seems simple. Programmatically focus an input element and test whether the element received focus. Using jQuery, both tasks are straight forward:

Everything is right with the world, your tests pass – until you notice tests dealing …

Read more »

Writing Testable Frontend Javascript Part 2 – Refactor away anti-patterns

This is the second of a two part introduction on how to write testable Javascript UI code. The first article, Anti-Patterns and their fixes, uses a sample application to introduce several common, avoidable, and test-inhibiting anti-patterns. Why these common practices …

Read more »

Writing Testable Frontend Javascript Part 1 – Anti-patterns and their fixes

This is the first of a two part introduction to writing testable Javascript UI code. The first article presents a basic sample application containing several common anti-patterns and their solutions. In the second article, the application will be refactored using …

Read more »

testmob.org – Distributed Javascript Unit Testing

This is a quick post to announce Testmob.org, a site that makes running QUnit tests across multiple browsers easy. TestMob is a distributed unit test system loosely based on John Resig’s TestSwarm. Manual unit testing Javascript across a variety of …

Read more »

Browser Bugs and Inconsistencies in localStorage

Even though localStorage has been around for several years, there are still inconsistencies across browsers when it comes to both removing items and reporting which items exist as members. IE8, Firefox Desktop