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

Like this? Share it with your network

Share

Javascript Tests with Jasmine for Front-end Devs

  • 4,059 views
Uploaded on

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.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,059
On Slideshare
4,059
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
30
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

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