Javascript Tests with Jasmine for Front-end Devs
Upcoming SlideShare
Loading in...5
×
 

Javascript Tests with Jasmine for Front-end Devs

on

  • 3,786 views

Jasmine isn't just for Rubyists - it's for anyone that wants to revolutionize their Javascript code and development workflow. I give a tutorial in getting up and running with an agile, Test Driven ...

Jasmine isn't just for Rubyists - it's for anyone that wants to revolutionize their Javascript code and development workflow. I give a tutorial in getting up and running with an agile, Test Driven Development workflow using nothing but HTML and Javascript.

Statistics

Views

Total Views
3,786
Views on SlideShare
3,786
Embed Views
0

Actions

Likes
2
Downloads
29
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Javascript Tests with Jasmine for Front-end Devs Javascript Tests with Jasmine for Front-end Devs Presentation Transcript

  • Javascript Tests with JasmineA Primer for Front-end Devs
  • Chris PowersConsultant with //obtivahttp://chrisjpowers.com@chrisjpowers
  • Get the Code!$ git clone git://github.com/chrisjpowers/jasmine_demo.git
  • Why Test Javascript?
  • Seems like alot of work just for some lousyregression tests...
  • Test Driven Development is about much morethan just writingtest coverage!
  • How Does TDD Work?•Red• Green• Refactor• Repeat!
  • RED•Identify a business requirement• Write a test to express the requirement•Watch the test fail• Ensure it failed “correctly”
  • GREEN• Write code to make the test pass• Write as little code as possible• Focus on the requirement, don’t solve future problems
  • REFACTOR•Improve your code quality• Remove duplication (DRY)• Modularize code• DO NOT change app behavior
  • REPEAT! Feature TestUnit Test Unit Test Unit Test
  • Enforces Good Design•Modular and Namespaced• Flexible, Updatable, Reusable• Easily Testable
  • Focus and Process• Driven by Business Requirements• Red, Green, Refactor• Know When You’re Done
  • “Free” Documentation•Legible Output• Expresses Object Behavior• Get Devs Up to Speed
  • Oh yeah... plus you get aregression test suite
  • What is Jasmine?•TDD Framework• Tests Run in the Browser• No Command Line Needed• Especially Rubyist Friendly
  • TutorialLet’s get testing...