Your SlideShare is downloading. ×
0
Testing JavaScript
© 2013 Eric Wendelin
@eriwen
Eric Wendelin
Blog: eriwen.com
Twitter: @eriwen
Code: git.io/eric
Today, we’ll talk about
• What makes JS testing hard
• A few ways we can make our JS more
testable
• Some tools that make ...
Why is testing your
JavaScript important?
The community is
behind in testing
Why is JavaScript so
hard to test?
Un-testable JS is
most of the problem
Don’t do this!
Do this!
Use with caution!
Better!
Don’t do this!
Do this!
Don’t do this!
Do this!
Don’t do this!
Do this!
Writing Tests
1 unit test framework +
1 functional test framework
= Infinite Pocket Bacon
Logic / Computation
unit test
Computation Example
User Interaction
functional test
Interaction Example
sinon.js
sinonjs.org
sinon.js goodies
• Jasmine Adapter
• QUnit Adapter
• Mocha Adapter
• Buster.js Adapter
• Chai-specific matchers
• Jasmine m...
ember-testing
/ember.js/packages/ember-testing
Karma
karma-runner.github.io
{F*** IT! WE’LL
DO IT LIVE!}
culture of testing
Code at: git.io/eric
Blog: eriwen.com
Twitter: @eriwen
Test your Javascript! v1.1
Test your Javascript! v1.1
Test your Javascript! v1.1
Test your Javascript! v1.1
Test your Javascript! v1.1
Test your Javascript! v1.1
Test your Javascript! v1.1
Test your Javascript! v1.1
Upcoming SlideShare
Loading in...5
×

Test your Javascript! v1.1

11,641

Published on

Introduction to unit/functional testing and continuous integration with JavaScript

Published in: Technology
1 Comment
14 Likes
Statistics
Notes
No Downloads
Views
Total Views
11,641
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
102
Comments
1
Likes
14
Embeds 0
No embeds

No notes for slide

Transcript of "Test your Javascript! v1.1"

  1. 1. Testing JavaScript © 2013 Eric Wendelin @eriwen
  2. 2. Eric Wendelin Blog: eriwen.com Twitter: @eriwen Code: git.io/eric
  3. 3. Today, we’ll talk about • What makes JS testing hard • A few ways we can make our JS more testable • Some tools that make testing easier
  4. 4. Why is testing your JavaScript important?
  5. 5. The community is behind in testing
  6. 6. Why is JavaScript so hard to test?
  7. 7. Un-testable JS is most of the problem
  8. 8. Don’t do this! Do this!
  9. 9. Use with caution! Better!
  10. 10. Don’t do this! Do this!
  11. 11. Don’t do this! Do this!
  12. 12. Don’t do this! Do this!
  13. 13. Writing Tests
  14. 14. 1 unit test framework + 1 functional test framework = Infinite Pocket Bacon
  15. 15. Logic / Computation unit test
  16. 16. Computation Example
  17. 17. User Interaction functional test
  18. 18. Interaction Example
  19. 19. sinon.js sinonjs.org
  20. 20. sinon.js goodies • Jasmine Adapter • QUnit Adapter • Mocha Adapter • Buster.js Adapter • Chai-specific matchers • Jasmine matchers • ... much more
  21. 21. ember-testing /ember.js/packages/ember-testing
  22. 22. Karma karma-runner.github.io
  23. 23. {F*** IT! WE’LL DO IT LIVE!}
  24. 24. culture of testing
  25. 25. Code at: git.io/eric Blog: eriwen.com Twitter: @eriwen
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×