Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.55 KB

ken-mazaika.javascript-testing-in-rails.md

File metadata and controls

32 lines (20 loc) · 1.55 KB

Javascript Testing in Rails

by Ken Mazaika

Abstract

Gone are the days where client-side coding was synonymous with cowboying up a bunch of jQuery. Nowadays we know better; libraries like Backbone, Ember, Angular and Underback.js let us write clean, maintainable, and testable javascript.

The biggest painpoint in testing javascript isn't writing the tests. It's getting the framework in place to make it possible.

Unfortunately, javascript testing isn't part of the omakase that Rails provides. This means the first barrier to doing javascript testing with your rails application is learning what tools are available, and what problems you need to solve.

Hopefully you're hungry; because this talk is about my omakase, and it's snack time.

This talk will answer the following questions:

  • How to configure the asset pipeline for testing
  • How to run javascript tests in the commandline and in the browser
  • How to integrate javascript tests with your rails test suite
  • What libraries exist for javascript testing, and which you should use
  • How to load HTML fixtures into your tests
  • Gotchas about TDD in Javascript

Additional Notes

I'm a Boston local, and have presented at boston.rb a couple of times. I gave a lightning talk about an opensource project I built and a talk about improving test speed.

Social