Más contenido relacionado
La actualidad más candente (20)
Similar a JavaScript frontend testing from failure to good to great (20)
Más de Philipp Fehre (18)
JavaScript frontend testing from failure to good to great
- 2. Ok so who is developing
TDD or test first?
- 5. Hi I am Phil, and I'm a
Developer...
@sideshowcoder (github) @ischi (twitter)
working for Cospired
- 9. Or they can't test what I
need!
function addFive(x) { return x + 5 }
... is not what I do day to day
- 10. They are hard to setup
1 hour project 2 hour setup?
What about CI integration?
- 11. But I want to testdrive my
code!
because my code is better when I do
- 12. Ok so lets see is it really
so hard?
lets walk through a simple example
- 14. Yeah I know just some
jQuery...
but I hope it shows some principles
- 15. Breaking code up by
responsibility
Small modules enable reuse
*do one thing and do it well!*
- 16. Be aware of your
dependencies
On which parts of the DOM do I rely on?
Which other plugins do I need?
- 18. And I got some
confidence that it does
what it says it does*
*different from 'it does what I want it to do'
but it's a start!
- 20. They can be run
headlessly
phantom-jasmine, jasmine-guard, jasmine-
headless-webkit
- 21. So yes it is possible to
TDD frontend code
IMHO