So who wants to hearanother testing talk?
Ok so who is developingTDD or test first?
DOM code?
Hi I am Phil, and Im aDeveloper...@sideshowcoder (github) @ischi (twitter)working for Cospired
Javascript frontendtestingfrom failure to good to great
TDD for DOM is hardright?
Either they are slowTDD fast feedback loop with capybaraanyone?
Or they cant test what Ineed!function addFive(x) { return x + 5 }... is not what I do day to day
They are hard to setup1 hour project 2 hour setup?What about CI integration?
But I want to testdrive mycode!because my code is better when I do
Ok so lets see is it reallyso hard?lets walk through a simple example
DEMOhttps://github.com/sideshowcoder/frontend-tdd-with-jasmine
Yeah I know just somejQuery...but I hope it shows some principles
Breaking code up byresponsibilitySmall modules enable reuse*do one thing and do it well!*
Be aware of yourdependenciesOn which parts of the DOM do I rely on?Which other plugins do I need?
Changes are easierEverything has its place
And I got someconfidence that it doeswhat it says it does**different from it does what I want it to dobut its a start!
Tests can be integrated inCIrake jasmine:ci
They can be runheadlesslyphantom-jasmine, jasmine-guard, jasmine-headless-webkit
So yes it is possible toTDD frontend codeIMHO
Questions?And thank you all for listening!
JavaScript frontend testing from failure to good to great
Upcoming SlideShare
Loading in...5
×

JavaScript frontend testing from failure to good to great

179

Published on

Livecoding of a jQuery plugin TDD-Style.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
179
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "JavaScript frontend testing from failure to good to great"

  1. 1. So who wants to hearanother testing talk?
  2. 2. Ok so who is developingTDD or test first?
  3. 3. DOM code?
  4. 4. Hi I am Phil, and Im aDeveloper...@sideshowcoder (github) @ischi (twitter)working for Cospired
  5. 5. Javascript frontendtestingfrom failure to good to great
  6. 6. TDD for DOM is hardright?
  7. 7. Either they are slowTDD fast feedback loop with capybaraanyone?
  8. 8. Or they cant test what Ineed!function addFive(x) { return x + 5 }... is not what I do day to day
  9. 9. They are hard to setup1 hour project 2 hour setup?What about CI integration?
  10. 10. But I want to testdrive mycode!because my code is better when I do
  11. 11. Ok so lets see is it reallyso hard?lets walk through a simple example
  12. 12. DEMOhttps://github.com/sideshowcoder/frontend-tdd-with-jasmine
  13. 13. Yeah I know just somejQuery...but I hope it shows some principles
  14. 14. Breaking code up byresponsibilitySmall modules enable reuse*do one thing and do it well!*
  15. 15. Be aware of yourdependenciesOn which parts of the DOM do I rely on?Which other plugins do I need?
  16. 16. Changes are easierEverything has its place
  17. 17. And I got someconfidence that it doeswhat it says it does**different from it does what I want it to dobut its a start!
  18. 18. Tests can be integrated inCIrake jasmine:ci
  19. 19. They can be runheadlesslyphantom-jasmine, jasmine-guard, jasmine-headless-webkit
  20. 20. So yes it is possible toTDD frontend codeIMHO
  21. 21. Questions?And thank you all for listening!

×