Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Unit testing


Published on

Lighting talk from jQuery Developer Summit 2015

Published in: Technology
  • Be the first to comment

Unit testing

  1. 1. Unit Testing jQuery Foundation Developer Summit 2015 @leobalter
  2. 2. Unit Testing is easy
  3. 3. Unit Testing is easy if you test from day one.
  4. 4. Units The very small parts of your app, like a specific return on a simple function call.
  5. 5. Why Unit Tests? • Collaborative work • Automation • Prevents regressions • Reliable Code
  6. 6. Collaborative Work Contributors do not know the whole API, and may work on specific features only.
  7. 7. Automation You can run the tests several times, in many environments, on many machines, by any developer
  8. 8. Prevents regressions New features might break something else, catch it while you can.
  9. 9. Reliable Code Helps preventing lots of unexpected nightmares
  10. 10. Hard Work Work hard, to work less later.
  11. 11. If you don’t test, users will.
  12. 12. QUnit
  13. 13. • test/index.html • qunit.js • qunit.css • my_app.js • test/my_tests.js
  14. 14. QUnit Example