JS Testing I - Unit Tests in the Browser

 

 

Ben Paddock

@_pads

Hello!

 

  • Software Developer @ Talis

Coming Up

 

  • What's the point?
  • A walk-through (get your laptops ready!)
  • Useful resources

Why Unit Test?

 

  • Build up an app gradually, in a guided fashion (BDD)
  • Fast feedback
  • Refactor with confidence!

What About Functional Tests?

 

  • Yes, definately write these too but...
  • Slower feedback
  • Hard to write a functional test for all scenarios (edge cases, error handling)

Let's Code!

 

https://github.com/BrumJS/testing.git

 

  • You will need:
    • An internet connection
    • NodeJS
    • A web server:
      • npm install -g servedir
    • Your text editor/IDE of choice
    • Your browser of choice

Some Light Reading

  • Test-Driven JavaScript Development: http://tddjs.com/
  • Testable JavaScript: http://shop.oreilly.com/product/0636920024699.do

Thank You!

 

https://github.com/BrumJS/testing

 

Questions?

JavaScript Testing I - Unit Tests in the Browser

By Ben Paddock

JavaScript Testing I - Unit Tests in the Browser

The first in a series about JavaScript testing.

  • 596