Pro Yearly is on sale from $80 to $50! »

Test driven JavaScript

Test driven JavaScript

The slides from master class I did on XP Days 2012

F32f547e66f3b6528376d67fdb67008f?s=128

Alexander Beletsky

November 17, 2012
Tweet

Transcript

  1. TEST DRIVEN JAVASCRIPT Show & Talk

  2. None
  3. >5 years of programming C# for fun and profit

  4. >5 years of practicing TDD

  5. “No line of production code without unit test “ rule

    that worked perfect for me during .NET programming
  6. But it FAILED miserably that I started JavaScript programming

  7. None
  8. > Reason 1 JavaScript code seems to be small and

    easy
  9. > Reason 2 Leaving comfort zone is always hard

  10. > Reason 3 DOM appears to be not testable at

    first glance
  11. None
  12. Frameworks && Tools

  13. qUnit, Jasmine, Mocha

  14. Testing business logic

  15. Testing UI/DOM code

  16. Mocking/Spying on objects

  17. Testing AJAX-dependent code

  18. Continuous Testing with LiveReload

  19. Final recommendations: 1. Don't be afraid to start testing. 2.

    Baby steps practice works. 3. Use MV* frameworks.
  20. Thanks, @alexbeletsky