Make it Modular

One of the most powerful features of node.js is its package manager, npm, and the wealth of modules it gives you access to. By using node modules you can leverage work done by other members of the community and spend more time focusing on solving your specific problem. There are other benefits to node modules though: they make your code more testable by splitting out non-critical logic, they make your code more maintainable by reducing the code paths through code you’ve written, and they improve the organization of your overall project.

Testing JavaScript applications with sinon.js

As developers, we know how important testing our code is and furthermore how much we can gain from automating these tests. That said, most modern web systems are inherently difficult to test due to their interconnected nature. Depending on the architecture of your application it’s at best tedious to test just your code and at worst impossible.

Testing Drupal with CasperJS

In our last post we used CasperJS to rapidly test the user interface of a website. Now we will build on these skills and add a familiar element into the mix: Drupal. Like any framework, Drupal offers many predictable, standard behaviors which we can take advantage of. Using this predictability, we can easily test many behaviors including logged-in activity such as posting content.

Use element queries today with eq.js

With responsive images this close to landing natively in several major browsers, everyone has turned their attention to the next major hurdle: element queries. You might be asking yourself what an element query is. Read on to find out all about element queries and how you can use them today!

A practical guide for 1000ms renders

Howdy perfers! This week we’ve got a good one for you. Web chef Ian Carrico has written an extensive how-to documenting his journey to the mythical 1000ms render. The post is featured on his own blog where he worked the magic, and it’s accompanied by both the code that powers his site along with a full Ansible script allowing you to set up a similarly-configured server on your own. Read on to find out more.

Simulate user actions with CasperJS

In this installment of our CasperJS series, we will begin looking at ways to interact with a website as a regular visitor would. Clicking links, using keyboard navigation, and filling forms are all standard activities as we browse websites. Read on to see how easy it is for Casper to do the same.

Frontend roundup: DrupalCon Amsterdam

As many of you might know, I am now on the other side of the pond, so I’ve paid extra attention to the DrupalCon Amsterdam schedule as it has been coming together. I want to highlight a few frontend goodies that I’m particularly excited to see.

Testing JS code with CasperJS

In part one of our CasperJS series, we briefly introduced CasperJS and walked through a functional test for Picturefill, a frontend component of a website. In this article, we will discuss the process of testing your codebase itself. If there are important pieces of JS that allow for critical features on your website, it’s easy to write a CasperJS test that keeps an eye on them for you.

Using CasperJS to test Picturefill

This is the first in a series of posts about CasperJS, a functional testing tool for the frontend. Casper is built upon JavaScript, the language we’re already using to power the web. It’s easy to learn and just as versatile as the browser itself. Read on for a practical demo featuring Picturefill, the JS library for responsive images.

Pages